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

Embedded hyperlinks break on line breaks #158

Open
huertanix opened this issue May 19, 2022 · 1 comment
Open

Embedded hyperlinks break on line breaks #158

huertanix opened this issue May 19, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@huertanix
Copy link
Member

After converting a PDF file with an embedded hyperlink, the safe copy splits hyperlinks between line breaks rather than keeping the link intact across the line break.

e.g. a line like this:

tktktktktktktktktktktktk https://datatracker.ie
tf.org/doc/draft-knodel-e2ee-definition/.

...creates two links, one "https://datatrack.erie/" link on the first line, and a different "http://tf.org/doc/draft-knodel-e2ee-definition/"

To reproduce:

  1. Process a PDF with a long, multi-line hyperlink. Example used can be found here: https://eprint.iacr.org/2022/449
  2. Open the safe PDF and find the same link
  3. click on the link on the first line of text that the link appears in, and then click on the second link
@gmarmstrong
Copy link
Contributor

gmarmstrong commented May 28, 2022

What PDF viewer are you using? Dangerzone doesn't create hyperlinks in that document on my end (at least, not as of #161), nor in any other document I've tried. Could the PDF viewer be inferring that tf.org/doc/draft-knodel-e2ee-definition/ is a link of its own because of the .org?

EDIT: Here's something to investigate: a StackExchange comment regarding using ps2pdf for PDF compression (which we do) alludes to this issue:

"Despite the fact that this one approach became my favorite solution to compress pdf files, it breaks up url links the document may have [...]"

If that's what's happening, maybe we could provide an option to skip file compression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants