I'm trying to use Puppeteer ( https://github.com/GoogleChrome/puppeteer) to create a PDF file for an express app, here is the code:
var puppeteer = require('puppeteer');
var browser = await puppeteer.launch({headless: true});
var page = await browser.newPage();
await page.goto(fullUrl + '/#shareDiv', {waitUntil: 'networkidle'});
page.emulateMedia('screen');
await page.pdf({path:'./uploads/pdfDownload'+Date.now()+'.pdf', printBackground: true, width: '1000px'});
browser.close();
That generates a pretty good PDF but it is hiding any input elements (radios, checkboxes, etc.)
Also I want to target a specific div referenced by ID.
One other thing is get rid of pages on the PDF.
Is this type of customization available on Puppeteer?
Puppeteer will use print-media to generate the PDF, so you'll probably want to try and emulate a screen and see if that fixes your issues (see docs here).