ashish singh
ashish singh

Reputation: 6914

why puppeteer not allows pdf download when headless is set to false?

in puppeteer, you can only download pdf in headless mode,

what might be the reason(technical challenges, or otherwise) that it could not be implemented in head full mode?

if you go to https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions

it says Generating a pdf is currently only supported in Chrome headless. but I was curious why this might be the case.

Upvotes: 1

Views: 2113

Answers (1)

hardkoded
hardkoded

Reputation: 21705

It's related to the fact that in headfull mode there is a UI component involved when printing to PDF (the print dialog), and that's not solved yet. You can follow the open issue here.

Upvotes: 2

Related Questions