Pressjet

Convert HTML to PDF.

Generate invoices, contracts and reports from HTML and print CSS. Run the Pressjet CLI on Linux or send HTML to your self-hosted API.

Sample PDF invoice with an itemized table, balance due and page footer

Render through the HTML API

POST /v1/html

Send populated HTML to your service. Pressjet returns the PDF in the response.

curl --fail-with-body http://localhost:8080/v1/html \
  -H "Authorization: Bearer $PRESSJET_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
    "version": 1,
    "html": "<style>@page { size: A4 }</style><h1>Invoice 42</h1>"
  }' \
  --output invoice.pdf
Read the HTML API guide ↗

Render a local file

The Linux CLI reads a local HTML file and its referenced local assets.

pressjet render invoice.html -o invoice.pdf
Install the CLI

Page sizes, breaks and tables

Use @page for page size and margins, CSS page breaks to keep sections together, and <thead> for repeated table headings. Supply images and fonts with the request. Render dynamic content before sending the HTML.

See supported print CSS ↗