Support setting margin via CSS
Closed this issue · 2 comments
MatthiasKunnen commented
Puppeteer-report does not respect the margin set by @page
rules but only the margin set by PDFOptions
. Adding support for this would be a nice to have although not to be underestimated.
The tricky thing is that it is possible for the first page to have a different margin from the rest of the document using the :first
pseudo-selector. Admittedly, support for this is buggy across browsers.
Page rules can be checked with JavaScript using document.styleSheets[].cssRules
.
PejmanNik commented
As you mentioned, we can not fully support it, but I'm ok with a PR if you need the basic functionality.