Details
-
Task
-
Resolution: Unresolved
-
P4: Low
-
None
-
6.4.0 FF
-
None
Description
We got a code contribution for this: https://codereview.qt-project.org/c/qt-labs/qtpdf/+/264016
A named destination is an anchor within a document. So far I haven't seen a PDF that has named destinations that are not bookmarks, so QPdfBookmarkModel works fine. But a hypothetical scenario could be that a piece of software ships with a manual in PDF format, and context-sensitive help could be provided by jumping to named destinations in the manual. If those are not bookmarks, maybe we need to add API for this. At any rate, Pdfium has a separate API for some reason: the patch uses FPDF_CountNamedDests FPDF_GetNamedDest and FPDFDest_GetDestPageIndex (was FPDFDest_GetPageIndex) whereas bookmarks use FPDFBookmark_GetFirstChild FPDFBookmark_GetTitle FPDFBookmark_GetDest FPDFDest_GetDestPageIndex FPDFDest_GetLocationInPage and FPDFBookmark_GetNextSibling. I.e. bookmarks are hierarchical, and can point to named dests, which in themselves are not hierarchical; but it could also be that named dests can exist separately.
The hypothetical help system would use strings for anchor names and then search the known named dest objects to find the place to which to jump. If we don't need to display a list, we don't need a QAIM though. We could get by with an overload of QPdfPageNavigator::jump(QString), for example. But the application might need the list anyway, to populate the help links or validate them ahead of time or something like that. Perhaps we should build an example with a help system like that, at some point; but on the other hand, PDF format is best suited for material that's meant to be printed, or perhaps for small "reference cards" if the help is broken up into small snippets that would fit on them. For on-screen help of any length, I'd rather have continuous reflowable text, uninterrupted by page breaks: markdown or html.
https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=20448
https://www.helpandmanual.com/help/hm_advanced_contexthelp_pdfdestinations.html
Attachments
Issue Links
- relates to
-
QTBUG-5583 When clicking on a link to a file that is part of the help collection, it should only call setSource() if it knows it can handle the file extension
- Closed
-
QTBUG-9465 Be able to reference file system files from pages inside a collection file in Qt Assistant
- Open
-
QTBUG-2514 QtHelp: Add support for loading PDF's outside the help collection.
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-103891 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
413429,4 | Add QPdfDocument::namedDestinations() | dev | qt/qtwebengine | Status: NEW | +1 | 0 |