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

When text exported to PDF first characters of every title in qpdfview is clickable link that opens local folder #580

Open
krunose opened this issue Mar 31, 2022 · 6 comments

Comments

@krunose
Copy link
Contributor

krunose commented Mar 31, 2022

Don't know if title explains it, but when text is exported to PDF every title (all levels) is a clickable link

  • first character is clickable link (red square)
  • that link opens local folder that holds the file
  • tooltip on hover gives Open ".

Opening and inspecting same file in Firefox (as PDF) shows one span element for the first character and second for the rest of the title; but first character is not clickable link.

It's on Lubuntu 20.04 with QT 5.12.8, ReText 7.1.0 (and qpdfview).

@krunose krunose changed the title When exported as PDF first characters in titles are marked as links (that opens current file folder) When text exported to PDF first characters of every title is set as clickable link Mar 31, 2022
@krunose krunose changed the title When text exported to PDF first characters of every title is set as clickable link When text exported to PDF first characters of every title in qpdfview is clickable link that opens local folder Mar 31, 2022
@mitya57
Copy link
Member

mitya57 commented Apr 2, 2022

Hi!

I cannot reproduce this (but I have Qt 5.15.2).

Can you please:

  • Attach source file and PDF file.
  • Tell me if you have “Edit → Use WebKit renderer” or “Edit → Use WebEngine (Chromium) renderer” checked?

@krunose
Copy link
Contributor Author

krunose commented Apr 3, 2022

Hi,

under Edit I have Use WebKit renderer and is unchecked.

Here are sample files:

pdf output.pdf
source text.md

Thank you.

@mitya57
Copy link
Member

mitya57 commented Apr 10, 2022

Found it. You probably have toc or a similar extension enabled, which adds id attribute to all headers.

And when Qt sees such a header, it turns it into a link. I have submitted a fix for this to Qt codereview: https://codereview.qt-project.org/c/qt/qtbase/+/405495.

@krunose
Copy link
Contributor Author

krunose commented Apr 10, 2022

Great! Yes, toc extension is enabled. Thanks for ReText, I really enjoy using it!

@mitya57
Copy link
Member

mitya57 commented Apr 10, 2022

Thanks for your translation too :)

@krunose
Copy link
Contributor Author

krunose commented Apr 10, 2022

Planning to revise/update as it has been quite a while since I did that.

qtprojectorg pushed a commit to qt/qtbase that referenced this issue Apr 28, 2022
Otherwise, when anchor is just something that can be linked to (not a
link itself), it will result in a PDF link pointing to an empty URI.

See retext-project/retext#580.

Pick-to: 6.3
Change-Id: Ib3c71797b09579783d74505601bad08c84856719
Reviewed-by: Lars Knoll <[email protected]>
qtprojectorg pushed a commit to qt/qtbase that referenced this issue Apr 29, 2022
Otherwise, when anchor is just something that can be linked to (not a
link itself), it will result in a PDF link pointing to an empty URI.

See retext-project/retext#580.

Change-Id: Ib3c71797b09579783d74505601bad08c84856719
Reviewed-by: Lars Knoll <[email protected]>
(cherry picked from commit 189bcbe)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
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