wooio / htmltopdf-java

An HTML to PDF conversion library written in Java, based on wkhtmltopdf.
MIT License
173 stars 97 forks source link

Text is tiny when no zoom value is provided #21

Closed plumpNation closed 5 years ago

plumpNation commented 5 years ago

First, many thanks for providing this library.

Mac OS: 10.14.2 Related issue: https://github.com/wooio/htmltopdf-java/issues/17

I see that this library is using the 0.12.4 version of wkhtmlpdf in this project.

I have run 0.12.5 version on the command line with no zoom parameter. It renders the pdf to look like the same size as the html is rendered in the Chrome 71.0.3578.98 browser.

While I am able to get close enough to a good result using a zoom factor on the HtmlToPdfObject, I am wondering why it is necessary to provide the zoom factor at all.

I have found a couple of issues on the wkhtmlpdf project regarding zoom/dpi on different platforms.

https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3241 https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3266

benbarkay commented 5 years ago

@plumpNation do you think that upgrading to 0.12.5 will solve it?

plumpNation commented 5 years ago

I think it could well fix this yes.

benbarkay commented 5 years ago

@plumpNation released 1.0.8 with 0.12.5, let's see if this works

plumpNation commented 5 years ago

That is much better. Many thanks for the quick update.

benbarkay commented 5 years ago

@plumpNation Did this solve it?

plumpNation commented 5 years ago

Yes this did solve it. Thank you.