Open darcyowens opened 2 years ago
Sadly it's a deffiency in chrome's Puppeteer. MDPDF takes the markdown and converts it to HTML, and then uses Puppeteer to render the HTML and convert to a PDF. Puppeteer doesn't allow you to apply styles to heads and footers at the moment using CSS.
Previously in v1 we used PhantomJS which did allow this but that project is now deprecated and unmaintained so we had to make the shift to puppeteer despite this sadly.
I would suggest raising a ticket with Puppeteer to ask about it.
Maybe one could use juice or inline-css to inline styles into the header/footer .hbs
files before passing them to mdpdf (for inline-css, check this issue too)
Currently attempting to get styles applying to headers and footers using the API. I'm trying to use the examples given in this repo. Seems no style is applying, any insight or are headers and footers completely broken in v2 releases?
All I'm getting at the moment is a very small, illegible header.
Here's the code/stylesheet/header:
header.hbs
styles.css
index.js
Using
mdpdf 2.1.2
.