View Single Post
Old 07-02-2019, 06:11 PM   #18
anon_me
Junior Member
anon_me began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2019
Device: Amazon
Quote:
Originally Posted by Pkoetsie View Post
I had the same issue with a couple of PDFs that were created with Calibre, and managed to fix it by transforming them using Ghostscript.
I ran the following command to have Ghostscript recreate the PDFs:
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="<New PDF file>" "<Original PDF file>"
This worked for me and it had to be very specifically written (i.e. must use quotes even for paths that don't have spaces, etc in them).

Make sure the the source and destination are places the GhostScript command will have access to. I had permissions issues in the beginning even when running under my own user account. Got it working when I moved the file(s) to my Public folder and gave "everyone" Read & Write access.

I also had to add the -dPrinted=false option to keep the links functional


Final command...

Code:
gs -dNOPAUSE -dPrinted=false -dBATCH -sDEVICE=pdfwrite -sOutputFile="/Users/<your username here>/Public/outputfile.pdf" "/Users/<your username here>/Public/inputtfile.pdf"
anon_me is offline   Reply With Quote