I am trying to generate PDF using puppeteer, everything works fine but input & checkboxes are not editable. In documentation i can't find how to make it editable, or elsewhere.
is it possible ? if so how ?
// ...
const _conf = _.merge(conf, {
format: 'A4',
margin: {
left: '15px',
top: '15px',
right: '15px',
bottom: '15px'
}
});
const browser = await puppeteer.launch({ headless: true })
const page = await browser.newPage()
await page.setContent(html)
const buffer = await page.pdf()
await browser.close()
return buffer;
Puppeteer is a Node library which provides a high-level API to control Chromium over the DevTools Protocol. The API allows you to call Chromium functionality to generate PDF. The API doesn't do anything special, just providing the layer to the functionality of Chromium. As of the above, this is not the question for Puppeteer team indeed. They already answered this @ Pdf form inputs not editable.
Now to the Chromium ... "Save as PDF" option is designed to generate PDF for printing and does not support HTML form controls mapping to PDF AcroForms elements. They are not going to implement it any time soon per answer from the project member @ Issue 1024713: save-as-pdf doesn't generate editable form inputs.
Bottom line: It is not possible with Puppeteer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With