After an upgrading following a break dependency on my MacOS High Sierra 10.13.5, the command "ps2pdf" doesn't work anymore.

I use it with latex to convert a ghostscript file .ps, generated from latex compiler and dvips command.

Here is below the error I get with ps2pdf : $ ps2pdf file.ps

While reading gs_ll3.ps:
Error: /undefinedresource in findresource
Operand stack:
   (gs_icc.ps\000gs_mex_e.ps\000gs_mro_e.ps\000gs_pdf_e.ps\000gs_wan_e.ps\000pdf_ops.ps\000gs_l2img.ps\000pdf_rbld.ps\000pdf_base.ps\000pdf_draw.ps\000pdf_font.ps\000pdf_main.ps\000pdf_sec.ps\000gs_cff.ps\000gs_mgl_e.ps\000gs_ttf.ps\000gs_dps.ps\000gs_dpn...)   (gs_ll3.ps)   1   Pscript5Idiom.mp_1554149595   IdiomSet   6   Pscript5Idiom.mp_1554149595
Execution stack:
   %interp_exit   --nostringval--   findresource   %loop_continue   findresource   findresource   findresource   false   1   %stopped_push   --nostringval--   1969   7   5   %oparray_pop   findresource   findresource   --dict:16/18(ro)(G)--   --dict:2/2(G)--   findresource   2   %dict_continue   findresource   findresource   1967   5   5   %oparray_pop   findresource   %errorexec_pop   findresource   findresource   findresource   findresource
Dictionary stack:
   --dict:1050/1123(G)--   --dict:0/20(G)--   --dict:72/200(L)--   --dict:1050/1123(G)--   --dict:40/43(G)--   --dict:16/18(ro)(G)--
Current allocation mode is global
Current file position is 18894

A solution is to use instead pstopdf but this binary doesn't produce href URL link on pdf generated output file : that's why I would like to make work the classical binary ps2pdf.

I tried to uninstall ghostscript macport and reinstall it but this doesn't change anything.

I have also tried with pdflatex but there are some errors too :

Underfull \hbox (badness 10000) in paragraph at lines 45--46

! Undefined control sequence.
\c@lor@to@ps ->\PSTricks 
l.54 \sepline

! Undefined control sequence.
\XC@usec@lor ...string \color@ #1#2\endcsname \@@ 
                                                  \fi \space 
l.54 \sepline

! Undefined control sequence.
\c@lor@to@ps ->\PSTricks 
l.54 \sepline


Any suggestion or help is welcome, regards.

  • After a reinstall some dependencies may have changed so likely candidates are different behaviours or missing components or worse duplicate versions of dvips tools such as auto-pst-pdf needing a perl script to run pdfcrop so worth checking locations and numbers of each package/component and their status for running as a resource (folder rights path alias etc.) – user170109 Apr 2 '19 at 19:41
  • You could try xelatex, which internally converts dvi to pdf (properly processing PSTricks code) without needing ps2pdf or pstopdf. This also preserves hyperlinks. – Marijn Apr 2 '19 at 21:16
  • Finally, I recompiled ghoscript from Linux sources and replaced the binary. Regards – youpilat13 Apr 28 '19 at 0:08

ps2pdf is included in the Ghostscript package. Thus first, verify that you already have installed. In the terminal window try with:

find /usr/local/ -name ps2pdf

Then, you will receive the new location of the 'ps2pdf' file. In my case it was '/usr/local//Cellar/ghostscript/9.50/bin/ps2pdf'. If you don't have installed the Ghostscript package, try to install it by using brew package manager:

brew install ghostscript
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.