PlatformXeDocs
Get API Key

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

  1. Your application sends pre-rendered HTML, or the id of a stored template and its data, to the PlatformXe API.
  2. 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).
  3. 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 typeExample
InvoicesMonthly billing statements with line items and totals
ReportsUsage analytics, audit summaries, export reports
ContractsService agreements, terms of service documents
CertificatesCompletion certificates, verification letters
ReceiptsPayment 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

MethodPathDescription
POST/api/v1/pdf/generateRender HTML, or a stored template, to a PDF (stored file with a link, or base64)
POST/api/v1/pdf/rasterizeConvert one page of a PDF into a JPEG/PNG image

Next steps