wooio / htmltopdf-java

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

Hi, I have another issue of how can we add custom pagesize and also add headers and footer to every page #55

Open Developer74 opened 1 year ago

Developer74 commented 1 year ago
    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.

Originally posted by @benbarkay in https://github.com/wooio/htmltopdf-java/issues/17#issuecomment-449593121