Migrate from Puppeteer or Playwright¶
Move the final HTML your application prints. Keep your current code that loads records and prepares the document data. If Chrome currently builds part of the document using JavaScript, produce that markup before handing it to PressJet.
Capture the printable input¶
Save a representative invoice with its final rows, fonts, images, and print CSS. Check that the HTML contains the rows even if you open the source without running JavaScript. Browser state such as canvas content must become an image or static markup first.
| Browser PDF setting | PressJet equivalent |
|---|---|
format, width, height, landscape |
size inside @page |
| PDF margin option | margin inside @page |
| Header or footer template | Margin boxes or running elements in print CSS |
| Wait for a selector or for network idle | Complete data preparation first and supply assets explicitly |
Render and compare¶
pressjet check invoice.html
pressjet render invoice.html -o pressjet.pdf
Read the diagnostics for unsupported CSS, substituted fonts, and missing resources. Compare totals and page starts on a one-page invoice and a long invoice with repeated headers. Pay particular attention to automatic table widths, float layouts, and mixed-font baselines. HTML behavior and known differences
For a browser-versus-PressJet comparison using the same dataset, follow the runnable migration sample.