tavinus / pdfScale

Bash Script to Scale and Resize PDFs using Ghostscript
MIT License
242 stars 36 forks source link

[BUG]: `-dNEWDPF` deprecated?! Page drawing error! #50

Closed zenny closed 2 months ago

zenny commented 4 months ago

Hi,

I ran a command:

pdfscale -v -v -r A5 -s 0.95 -a none <infile.pdf>

but got the following error that failed to produce output:

2024-05-24:07:30:02 |   Final Status: Error detected. Exit status: 0
PdfScale: ERROR!
Ghostscript Debug Info:
The old, written in PostScript, PDF interpreter has been removed entirely.
You should cease using -dNEWDPF as it has no effect now.
Continuing to process PDF file using the new, written in C, PDF interpreter.The old, written in PostScript, PDF interpreter has been removed entirely.
You should cease using -dNEWDPF as it has no effect now.
Continuing to process PDF file using the new, written in C, PDF interpreter.
   **** Error: Page drawing error occurred.
               Could not draw this page at all, page will be missing in the output.
GPL Ghostscript 10.02.1: Unrecoverable error, exit code 255
GPL Ghostscript 10.02.1: Page object was reserved for an Annotation destination, but no such page was drawn, annotation in output will be invalid.

Thanks and cheers.

tavinus commented 2 months ago

Thanks for posting this.
I wonder if we can know for sure which versions of GS should use -dNEWPDF.
Otherwise it would need to become yet another parameter (for people using those versions that require it).

tavinus commented 2 months ago

Duplicate of #44 v2.5.9 added the --newpdf parameter and disabled using -dNEWPDF=false by default.
Cheers