Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdfScale doesn't preserve hyperlinks #14

Closed
psiccardi opened this issue Jul 8, 2019 · 3 comments
Closed

pdfScale doesn't preserve hyperlinks #14

psiccardi opened this issue Jul 8, 2019 · 3 comments

Comments

@psiccardi
Copy link

psiccardi commented Jul 8, 2019

Using pdfscale to scale a page doesn't preserve hyperlinks.
Could you add the possibility to pass the "-dPrinted=false" parameter to gs?
Now i'm using this script with the addition of this parameter (i edited the script in my local machine) to achieve my goal.
Anyway, nice work! This script saved me hours of life!

@tavinus
Copy link
Owner

tavinus commented Jul 8, 2019

Thanks for letting me know.
I will try to add and test that soon.

@tavinus
Copy link
Owner

tavinus commented Sep 11, 2019

Possible solutions:

  • Ghostscript option: -dPrinted=false
  • Hyperref option "pdfa": \usepackage[pdfa]{hyperref}

More info:

Problems:

  • The -dPrinted=false ghostscript option will have the effect to drop print annotations.
  • The pdfa hyperref option will make the PDF have boxes around the links when printed, making the document less readable.

GS manual info

image

Conclusions

I will probably just set an optional flag for dPrinted=false.
Still not sure what should be the default though.
What is more important? Preserving URLs or preserving print annotations?

@tavinus
Copy link
Owner

tavinus commented Sep 13, 2019

Implemented on v2.4.9 ( e3d826d )

Created parameter --print-mode <screen|printer> to control the dPrinted parameter on GS calls.

Default behavior is unchanged, it is left empty which will use a print profile if there is an output file set (which we always do at this point).

Otherwise

  • --print-mode screen > adds -dPrinted=false to calls
  • --print-mode printer > adds -dPrinted to calls (forces print mode)

Forcing print mode is kind of useless at this point, but can become useful in the future.

Cheers!
Gus

@tavinus tavinus closed this as completed Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants