on-internet
← Community

What is the default CSS stylesheet PhantomJS uses when rendering PDF/HTML, and how to replicate it in Puppeteer?

Stack Overflow ·

Problem I'm migrating from node-horseman (PhantomJS wrapper) to Puppeteer for PDF generation and my output looks different — backgrounds, fonts, and spacing are off. I need to understand exactly what default CSS PhantomJS applies so I can replicate or override it in Puppeteer without breaking production. Current code (node-horseman / PhantomJS) let horseManPromise = horseman .userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0') .viewport(1200, 900); horseManPromise = horseManPromise .pdf(pdfTempFilePath, { format: paperSize, // e.g. 'A4' orientation: documentOr

Comments

Sign in or sign up to comment and upvote.

No comments yet.