[Webkit-unassigned] [Bug 112081] New: Printing to PDF should produce internal links when HTML has internal links
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 11 16:53:54 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=112081
Summary: Printing to PDF should produce internal links when
HTML has internal links
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: Enhancement
Priority: P2
Component: Printing
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: dml+webkit at google.com
Currently when outputting to PDF with Skia, WebKit treats links to elsewhere in the same HTML document the same as links to elsewhere on the Web. For example, a HTML page with a table of contents that links to headings later in the page will result in a PDF with links back to the original HTML page. A nicer user experience would be for these links to be put out as internal PDF links, so if the user clicks one, they are taken to the relevant page within the PDF.
Proposed solution:
1) When any element with an ID is encountered, output a named destination to the PDF. For example <h1 id="summary">Summary</h1> would result in a destination named "summary" in the PDF. Even if there are no links within the document to this ID, having this named destination allows links elsewhere on the Web to point to this part of the document (e.g. http://example.com/document.pdf#nameddest=summary).
2) When a link is encountered that points to the current document, the URL fragment (part after the "#") is taken and a link is produced that points to the corresponding named destination.
Note, I already have code to do this.
APIs to support this have already been added to Skia in change: https://code.google.com/p/skia/source/detail?r=8034
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list