Sample Header Ad - 728x90

Mac OS X pstopdf utility defaults to Letter page size

1 vote
1 answer
621 views
I am using the a2ps utility from Homebrew to pretty print code, generating .ps files, and then the Mac OS X utility pstopdf (used by Preview.app) to convert these to .pdf format. But whatever page size is specified in the PostScript, the generated PDF files have a Letter page size of 11 x 8.5 inches. For example
a2ps --medium=A4 -P file myfile.py
or
a2ps --medium=A3 -P file myfile.py
generate PostScript files with the correct page dimensions (A4 and A3 respectively) but when converted to PDF by pstopdf the resulting PDF is Letter size with the output truncated at the right/ bottom edge of the page. I can't find any mention anywhere of how to specify what default page size pstopdf uses. Opening the PostScript files in Preview.app uses pstopdf in the back end so I get the same result.
Asked by davidh_73 (11 rep)
Sep 29, 2020, 12:14 AM
Last activity: Oct 5, 2020, 02:03 PM