New issue
Advanced search Search tips

Issue 781797 link

Starred by 9 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Feature

Blocked on:
issue skia:7532

Blocking:
issue 607777



Sign in to add a comment

Feature request PDF bookmarks/outlines

Reported by rue...@t-online.de, Nov 6 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36

Steps to reproduce the problem:
Save webpage to PDF with chromium.

What is the expected behavior?
Create bookmarks in generated PDF files like in the attached wkhtmltopdf_test.pdf (generated with https://wkhtmltopdf.org/)

What went wrong?
In the chrome_test.pdf the bookmarks are missing.

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 61.0.3163.91  Channel: stable
OS Version: 16.04 Ubuntu
Flash Version: 

I've used wkhtmltopdf for generating PDFs and now switched to chrome headless, because wkhtmltopdf was to slow with their updates and didn't add HTML5 features as fast as chrome. The only feature I'm missing now is the bookmark/outlines creation from HTMLs header tags. Would it be possible to add that feature.
 
wkhtmltopdf_test.pdf
61.1 KB Download
chrome_test.pdf
106 KB Download
Components: Internals>Skia>PDF
Labels: -Type-Bug Type-Feature
Cc: kebalaji@chromium.org
Labels: M-64 Needs-Milestone OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Requesting someone from the respective team to look into the issue for further triaging. 

Thanks!
Components: -Internals>Skia>PDF Internals>Plugins>PDF
Owner: dsinclair@chromium.org
Status: Assigned (was: Untriaged)
I am pretty sure this is not a Skia issue, but a PDFium related one.
Components: -Internals>Plugins>PDF Internals>Skia>PDF
Owner: halcanary@chromium.org
As far as I can tell, this is PDF generation, not PDF display. Generating PDFs is in the realm of SkPDF.
internal links work.  Pdfium only jumps to the target *page*, not the target *location in the page*.
Cc: halcanary@chromium.org
Owner: dsinclair@chromium.org
Labels: Needs-Feedback
ruerob@ is the problem that the created PDF doesn't have the links at all, or the links when used in Chrome don't go where you expect?

Comment 8 by rue...@t-online.de, Jan 24 2018

Hello there.

The problem is definitely in the created PDF file.

If you open the attached wkhtmltopdf_test.pdf, from the original post, with chrome for example, you will see an icon for bookmarks in the upper right corner. When you click on this icon a drop down opens up where you can select the bookmark 'searching' to jump to its position in the text, or you can drop it down to see the bookmarks below it. This file was created with wkhtmlto pdf.

If you open the attached chrome_test.pdf the icon is missing. This file was created via puppeteer with chromium.

The bookmarks in the wkhtmltopdf file work as expected. They jump directly to the header, which the bookmark was generated from.

In the attached file you see which drop down I mean.

I hope this was helpful. :0)

Thank you for your time
ruerob
bookmarks.png
68.3 KB View Download
Cc: -halcanary@chromium.org dsinclair@chromium.org
Owner: halcanary@chromium.org
Per #8, this is an issue with the generation of the PDF, not the display/usage of the PDF. Sending over to SkPDF for triage.
Blockedon: skia:7532
Cc: dmazz...@chromium.org
Any update on this issue? skia:7532 issue looks to be resolved.

Comment 13 by halcanary@google.com, Yesterday (44 hours ago)

Cc: -dmazz...@chromium.org halcanary@chromium.org
Owner: dmazz...@chromium.org
Blink needs to use Skia's new API.

Comment 14 by halcanary@google.com, Yesterday (44 hours ago)

Blocking: 607777

Comment 15 by halcanary@google.com, Today (22 hours ago)

Cc: -halcanary@chromium.org halcanary@google.com

Sign in to add a comment