PDF Generation Overview
Server-side PDF rendering from HTML templates for invoices, reports, and documents.
The PlatformXe PDF Service renders HTML content into PDF documents on the server. Use it to generate invoices, reports, contracts, certificates, and any other document your application needs.
How it works
- Your application sends pre-rendered HTML, or the id of a stored template and its data, to the PlatformXe API.
- PlatformXe renders it on the server in a locked-down headless browser engine: no JavaScript runs and the page reaches no network (remote
https:images are fetched by PlatformXe on its behalf). - The PDF is stored as a private file of your organisation and returned as a time-limited, read-only link, or returned inline as base64 content.
PlatformXe is a dumb pipe for PDF generation. Your application owns template selection, data merging, and layout. PlatformXe receives ready-to-render HTML and produces the PDF.
Use cases
| Document type | Example |
|---|---|
| Invoices | Monthly billing statements with line items and totals |
| Reports | Usage analytics, audit summaries, export reports |
| Contracts | Service agreements, terms of service documents |
| Certificates | Completion certificates, verification letters |
| Receipts | Payment confirmations, transaction summaries |
Key features
- Server-side rendering -- nothing to install or run on your side
- Custom page options -- margins, orientation, paper size
- Link or base64 output -- a private stored file with a time-limited, read-only link (24 hours by default, up to 7 days), or inline base64 content
- Fast generation -- typical render times under 2 seconds
API scope
POST /api/v1/pdf/generate requires the pdf:generate scope and has its own 100/hr rate tier per API key (see Generate PDF); grant the scope by naming it on the key, as it is not one of the scopes a self-registered or portal sign-up key starts with. POST /api/v1/pdf/rasterize requires the pdf:rasterize scope and has its own 200/hr rate tier (see Rasterize PDF).
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/pdf/generate | Render HTML, or a stored template, to a PDF (stored file with a link, or base64) |
| POST | /api/v1/pdf/rasterize | Convert one page of a PDF into a JPEG/PNG image |
Next steps
- Generate PDF -- API reference for PDF generation
- Rasterize PDF -- API reference for converting a PDF page to an image