Closed ngajhede closed 4 years ago
Hello, That's intended behavior. From the Puppeteer documentation:
page.pdf() generates a pdf of the page with print css media. [...] NOTE By default, page.pdf() generates a pdf with modified colors for printing. Use the -webkit-print-color-adjust property to force rendering of exact colors.
I will update the documentation accordingly.
Hiya,
When setting a background color in the imported header and footer, it is not showing when generating a PDF. I tried using the
printBackground: true
option, but to no luck.What eventually worked was using the CSS rule
-webkit-print-color-adjust: exact
.Is this expected behavior? Does the rule only apply for the main content?