Tuesday, February 4, 2025

Newer versions of MacOS (Sonoma & Sequoia) will not play well with Postscript files

macOS Sonoma does not support viewing or converting PostScript filesHowever, it can still output PostScript to printers that support it.

In particular, it is no longer possible to click on a *.ps or *.eps file and open it in the Preview app. This is very very annoyingInstall ghostscript on macOS with MacPorts.  This installs a number of executables, though not pstopdf.  After reading some programmer comments, I added the following faux pstopdf to call ps2pdf with an option to trim whitespace around an image:

alias pstopdf 'ps2pdf -EPSCrop'   # will crop whitespace around image

-> which ps2pdf

/opt/local/bin/ps2pdf

-> ls -l /opt/local/bin/ps*
-rwxr-xr-x  1 root  admin    631 Feb  4 10:47 /opt/local/bin/ps2ascii
-rwxr-xr-x  1 root  admin   1264 Feb  4 10:47 /opt/local/bin/ps2epsi
-rwxr-xr-x  1 root  admin    272 Feb  4 10:47 /opt/local/bin/ps2pdf
-rwxr-xr-x  1 root  admin    257 Feb  4 10:47 /opt/local/bin/ps2pdf12
-rwxr-xr-x  1 root  admin    257 Feb  4 10:47 /opt/local/bin/ps2pdf13
-rwxr-xr-x  1 root  admin    257 Feb  4 10:47 /opt/local/bin/ps2pdf14
-rwxr-xr-x  1 root  admin   1078 Feb  4 10:47 /opt/local/bin/ps2pdfwr
-rwxr-xr-x  1 root  admin    647 Feb  4 10:47 /opt/local/bin/ps2ps
-rwxr-xr-x  1 root  admin    669 Feb  4 10:47 /opt/local/bin/ps2ps2
-> 

No comments:

 
Link