PDF outline
#879
Replies: 1 comment
-
The answer seems to be to use
And of course the latest versions of Chrome and Puppeteer as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I switched quite some time ago from wkhtmltopdf to BrowserShot, since the former was not properly rending modern web pages anymore at that point.
One feature I've been missing though, is automatically generated PDF outline.
I saw this comment in puppeteer - puppeteer/puppeteer#11779 (comment) : " With Pass GenerateDocumentOutline through new headless (in Chrome 126.0.6450.0 and later) things like chrome --headless=new --print-to-pdf --no-pdf-header-footer --generate-pdf-document-outline=true now work and emit a document outline. Passing generateDocumentOutline: true through the Chrome Devtools Protocol also works (here in puppeteer exposed as outline: true). "
However, when I add those Chromium arguments and use the new headless mode, it just seems to timeout? ( seems to be related to the first two; the last one does nothing ).
I suppose I just may need to try to somehow pass the "outline" (true) setting to puppeteer?
Anyone know what's going on, or how to actually get an outline in a PDF document; preferably based on h1 / h2 / h3 / ... headers?
Beta Was this translation helpful? Give feedback.
All reactions