Skip to content

Plan a migration to PressJet

Start with a document people already receive. Keep its CSS, fonts and images beside it, and save reference PDFs for representative inputs. Include the longest document and a case with repeated table headers.

Choose the guide for your renderer

Current renderer Starting point
Puppeteer or Playwright Capture print-ready HTML and replace the browser PDF call
Gotenberg Move Chromium HTML routes to the PressJet HTTP API
WeasyPrint Keep print CSS and map paged-media behavior
wkhtmltopdf Move print options from command flags into CSS
Dompdf Keep PHP rendering and replace the PDF export step
react-pdf Map document components and validate pagination
Forme Move HTML, JSX, or a hosted render workflow

Use the verification checklist to compare output and decide whether each template is ready to switch.

From Puppeteer

Capture the print-ready HTML your application passes to Chrome. Preserve @page, print CSS, page breaks and running headers. Supply images and fonts as inline data or attachments to keep rendering reproducible. If JavaScript fills the page, run that data preparation in the application and pass the resulting HTML to Pressjet.

pressjet check invoice.html
pressjet render invoice.html -o pressjet.pdf

The check reports unsupported CSS and missing resources. Compare extracted text, the first and last rows on each page, and page-edge headers. Move material differences into test fixtures.

From react-pdf

Keep the invoice data and component boundaries. Use semantic HTML to express the layout through the React WASM adapter. Map the document to an html element with a language and title, page boundaries to print CSS, headings and paragraphs to their HTML elements, and repeated rows to an HTML table with thead. The example renders the old and new components with the same data.

import { renderPdf } from '@pressjet/wasm/react';

const { pdf, diagnostics } = await renderPdf(renderer, <Invoice data={data} />, {
  stylesheets: [invoicePrintCss],
});

Run both comparisons

Use a shell with Node.js and Poppler. Download the WASM tarball from the GitHub release and install it alongside the renderers in a clean directory.

npm install react react-dom puppeteer-core @react-pdf/renderer /path/to/pressjet-wasm-0.1.0-beta.7.tgz
cp /path/to/pressjet/examples/migration/render.mjs .
mkdir -p puppeteer react-pdf
CHROME_PATH=/path/to/chrome node render.mjs puppeteer puppeteer
node render.mjs react-pdf react-pdf

Each comparison checks the ordered text on both pages, writes the two PDFs and reports the Pressjet diagnostics. Review the finished PDFs before migrating customer templates.