elliotblackburn / mdpdf

Markdown to PDF command line app with support for stylesheets
https://npmjs.com/package/mdpdf
Apache License 2.0
717 stars 47 forks source link

Issues with E-paper readers #107

Closed shafr closed 3 years ago

shafr commented 3 years ago

Hello, I'm using mdpdf to generate pdf's. Reading on PC/mobile phone is ok, but when I upload books to e-ink readers, i'm getting starange behaviour that black is not black but gray, so it's very hard to read from the book. IMG_20210916_115319

vs

image

What is the correct way to change font type / font color / font size ? Are there any examples of that ? (Is that the css section?)

elliotblackburn commented 3 years ago

The default styles applied are pulled from GitHub's markdown styling so the text isn't hard black but actually a dark grey which is probably causing the problem here. You can use the --style flag to provide your own CSS sheet as shown in one of the examples https://github.com/BlueHatbRit/mdpdf#example-usage.

When using the CLI, passing in your own CSS will disable the default github style rather than stacking on-top of it. If you like the style but just want to change the font colour I'd suggest taking a copy of our default style sheet, amending it to fit your needs, and passing that in with the --style flag.

That stylesheet can be found here https://github.com/BlueHatbRit/mdpdf/blob/master/src/assets/github-markdown-css.css

shafr commented 3 years ago

Thank you, that was very useful!

elliotblackburn commented 3 years ago

No problem, thanks for closing the issue :)