cakebake / markdown-themeable-pdf

ARCHIVED. NOT MAINTAINED. Themeable Markdown Converter (Print to PDF, HTML, JPEG or PNG)
https://atom.io/packages/markdown-themeable-pdf
133 stars 37 forks source link

High-DPI Display Font Size #105

Closed brandoningli closed 6 years ago

brandoningli commented 6 years ago

When rendering on a high-dpi display, the font sizes get screwed up to be incredibly small. In the attached image, the left ("test-hi-dpi") was rendered with my screen at 4K resolution, while the right was rendered with my screen at 1080p. The screenshot was taken with a 4K resolution on my screen.

I don't know if this is a markdown-themable-pdf issue or an atom issue at large.

markdown-pdf-render-issues

cakebake commented 6 years ago

Hello! I can not imagine that it has to do with the screen resolution.

For generation a headless browser is used, which is not based on your screen resolution, but on the configuration in the package settings.

I switch between a Full HD and 4k monitor every day. Should you find out, it would be nice if you let me know. Currently I work in the background at the v2. A test with it would be nice.

brandoningli commented 6 years ago

It's been a while, but with v1.2.1 and the Windows 10 April Update the font is rendered tiny unless the main display is set to 1080p. Current workaround is to render to html and print from my browser, but that obviously rids the document of the custom header/footer. ~It doesn't appear jpg/png have this issue.~

What are you using for the headless browser? Looking for the right repo to file a bug in.

cakebake commented 6 years ago

Hey @mrbmi513,

in the file https://github.com/cakebake/markdown-themeable-pdf/blob/master/package.json you will find the used repositories.

v1 uses html-pdf (phantomjs) and v2 puppeteer / chromium. I could not publish v2 yet, because there are problems regarding header and footer in chromium.

ghost commented 5 years ago

4k small font also.