Migrate from wkhtmltopdf¶
Keep the HTML that contains the final invoice or report data. Move the print settings from command flags into the document so the layout travels with the template.
Map print settings¶
| Common option | In PressJet |
|---|---|
--page-size, --orientation |
@page { size: A4 landscape; } |
--margin-top and related flags |
@page { margin: 20mm; } |
--footer-center "Page [page] of [topage]" |
@bottom-center { content: "Page " counter(page) " of " counter(pages); } inside @page |
--header-html or --footer-html |
Move the content into the main HTML as a running element |
PressJet recognizes the legacy page-break-before, page-break-after, and page-break-inside spellings. When an older template uses floated columns, use flexbox or explicit grid columns for the layout and check how text wraps.
Test a representative file¶
pressjet check statement.html
pressjet render statement.html -o statement.pdf
Resolve missing assets and unsupported style reports. Compare with the PDF produced by your deployed wkhtmltopdf version, especially headers, footer positioning, and page breaks.