tavinus / pdfScale

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

Losing links #19

Closed williamgurzoni closed 4 years ago

williamgurzoni commented 4 years ago

When resizing PDFs, the links are lost.

By the way, thanks for the amazing script!

tavinus commented 4 years ago

Hi there!
Sorry for the late reply.

This is related to the Ghostscript command dPrinted and can be adjusted in pdfScale using the parameter --print-mode <screen|printer>.

Here is what the pdfScale --help says:

 --print-mode <mode>
             Setting for GS -dPrinted, loads options for screen or printer
             Defaults to nothing, which uses the print profile for files
             The screen profile preserves URLs, but loses print annotations
             Modes: s, screen   Use screen options > '-dPrinted=false'
                    p, printer  Use print options  > '-dPrinted'

So, just add --print-mode s to your pdfScale call and you should be good to go. Hopefully you don't need to preserve annotations as well.

Please let me know if this solves your problem.

Cheers!
Gus

williamgurzoni commented 4 years ago

Perfect! Worked!

Thanks for amazing script.

Cheers, William Gurzoni

tavinus commented 4 years ago

Since the problem was solved and there seems to be no other problem after a week, I will close this issue.

Cheers! :beer:
Gus