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

PDF Table of Contents or Hyperlinks #42

Open
martin-ueding opened this issue Aug 14, 2015 · 2 comments
Open

PDF Table of Contents or Hyperlinks #42

martin-ueding opened this issue Aug 14, 2015 · 2 comments

Comments

@martin-ueding
Copy link

I have a lot of LaTeX documents on my phone. They have the LaTeX PDF hyperlinks from the hyperref package. However, I cannot click on the links in the table of contents. For some reason the links I have created manually with \href{mailto:…}{…} work.

There is no table of contents (or at least I have not found it). Together this makes it really hard to navigate in the document.

I would really appreciate a table of contents view for the opened PDF.

@dcaliste
Copy link
Contributor

The table of content (It's the case for Beamer presentations I've checked for instance) is available as an attached page :

  • tap the document to show the sharing panel.
  • you'll see there a dot on the top right indicating an attached page that you can reach with a right swype.

For inline links, this is currently not implemented. After a quick review, it's apparently quite easy to implement :

  • in pdf/pdfrenderthread.cpp:86 (function rescanDocumentLinks()), one should implement the link->linkType() == Poppler::Link::GoTo case. the destination page may be stored in the QUrl storage of the link list with a specific marker like page://n.
  • in pdf/pdflinkarea.cpp:88, the function should parse the URL to detect an internal link and emit a new internalLinkClicked() signal with the page number.
  • in plugin/PDFView.qml:146, should catch this new signal and call goToPage() with the argument.

I'll do this and test, if everyone agrees, in the coming days (or weeks…).

@martin-ueding
Copy link
Author

I did not know that the table of contents was hidden there. Thanks for pointing that out! I'd appreciate working hyperlinks but I cannot give you any input on your implementation approach --- I have no idea about this project or Sailfish OS programming.

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