puppeteer icon indicating copy to clipboard operation
puppeteer copied to clipboard

feat: add outline (document outline) PDFs option

Open bungeman opened this issue 1 year ago • 2 comments

What kind of change does this PR introduce?

feature

Did you add tests for your changes?

Yes

If relevant, did you update the documentation?

Yes

Summary

Chromium introduced generateDocumentOutline in 121. This allows for a PDF document outline (sometimes known as bookmarks) to be generated from the html document outline. This CL adds a outline property to request this extra PDF output.

Does this PR introduce a breaking change?

No

Other information

This change is heavily based on https://github.com/puppeteer/puppeteer/pull/11182 .

bungeman avatar Dec 06 '23 19:12 bungeman

Hmmm... it looks like generateDocumentOutline ended up in devtools-protocol r1226504 but it looks like devtools-protocol is still pinned to r1213968. So this will need to wait for a devtools-protocol roll. Guessing based on timing it looks like that may happen soon?

bungeman avatar Dec 07 '23 15:12 bungeman

it will update update once we update the bundled Chrome version and that happens once a Chrome version becomes stable. In this case, it looks like landed in M121 which will be released on Tue, Jan 23, 2024 https://chromiumdash.appspot.com/commit/9c2c6e785b9c644887c466ae49d7947e6c690171

OrKoN avatar Dec 07 '23 15:12 OrKoN

@bungeman the change for Chrome 121 (https://github.com/puppeteer/puppeteer/pull/11743) landed would you please rebase and address the comments.

Lightning00Blade avatar Jan 24 '24 15:01 Lightning00Blade