0

I am trying to run regular conversions of PS to PDF but having some issues with Ghostscript. Running under normal conditions the output crops the top of the page as you would expect since the PS is configured for A4 but doesn't define a page size. However, when I use the sPAPERSIZE or change the default in gs_init as described here it prints a blank page.

I tried on a colleges PC who is running adobe distiller and the conversion worked perfectly without issue. I also tried using PDF24 rather than GS directly - it cropped the same but I couldn't find an init file to change.

Unfortunately the PS files are auto generated and so changing them isnt an option.

Windows 10 10.0.17763 x64

GS 9.53.3

PDF24 9.2.2

Adobe Distiller: Version unknown (probably older)

harry
  • 1
  • 2

1 Answers1

0

Solved my issue:

C:\Program Files (x86)\gs\gs9.53.3\bin>gswin32c.exe -sOutputFile="output.pdf" -dNOPAUSE -dBATCH -sPAPERSIZE=a4 -sDEVICE=pdfwrite -dSAFER "input.PS"

Solved using a combination of answers from here to get the gs function https://stackoverflow.com/questions/30128250/ps2pdf-preserve-page-size#:~:text=An%20A4%20page%20has%20a,it%20comes%20to%20PDF%20output

and here to run gs in the command line (unable to get it to work outside of command line) Keep getting error messages in ghostscript when using the documented ghostscript syntax

harry
  • 1
  • 2