Closed dschm1dt closed 5 years ago
Seems to be related to https://bugs.launchpad.net/ubuntu/+source/wkhtmltopdf/+bug/1391456 I'll have a good look at it this weekend. Sorry for the delay in response.
It appears that the global settings don't have zoom
as a setting property. Try using HtmlToPdfObject#zoomFactor
instead, like so:
HtmlToPdf.create()
.pageSize(PdfPageSize.A4)
.object(HtmlToPdfObject.forHtml(html)
.zoomFactor(10))
.convert(destination);
Let me know if this works out for you.
Thank you, for the answer. This actually solves the problem. :)
Only for completeness, I am working on macOs 10.14.2, and with zoomFactor(3.1f) the resulting pdf looks like converted directly with wkhtmltopdf.
It appears that the global settings don't have
zoom
as a setting property. Try usingHtmlToPdfObject#zoomFactor
instead, like so:HtmlToPdf.create() .pageSize(PdfPageSize.A4) .object(HtmlToPdfObject.forHtml(html) .zoomFactor(10)) .convert(destination);
Let me know if this works out for you.
Hi, can you please say solution to add custom pagesize and add headers and footer to it
Hello, when I am creating pdf's with the library the content is much smaller as if I just create it with wkhtmltopdf. I experimented with diffrent setting mechanisms and discovered that zoom has no affect at all... My code looks as follows:
Every value submitted to zoom creates the same output.