Back to services
API OverviewDocument Automation

HTML to PDF Render API

Renders supplied HTML and CSS into a PDF document.

When to use this API

This API converts HTML payloads into PDF files for invoices, reports, statements, contracts and customer-facing documents. It is designed for repeatable output, predictable billing and integration into transactional backend flows.

  • You need deterministic PDF generation from templates rendered by your application.
  • You want to centralize document rendering in one API instead of running local PDF tooling.
  • You need usage tracking and predictable token billing per generated page.

Typical use cases

  • Invoice and billing document generation.
  • Order confirmations and compliance documents.
  • Internal reports and customer downloadable statements.

Billing model

HTML to PDF billing is based on generated PDF pages. One generated PDF page equals one pdf_page service billing event; it is not billed as a generic API call.

  • More generated PDF pages means more pdf_page billing events.
  • Rejected requests before execution are not treated as generated-page events.
  • Use page format, margins and CSS page sizing intentionally because they can affect generated page count.

APIRAPTOR token model

Tokens are APIRAPTOR's communication unit. One token equals 100 subtokens, and service usage is charged per service billing event.

  • Trial availability, token amount and duration come from Billing configuration.
  • Users have access to all services from day one; services are not premium-gated per plan.
  • HTML to PDF uses the pdf_page service billing event for generated PDF pages.

Input data

You send HTML markup and optional render settings such as page format, orientation, margins and print background strategy.

Output data

Synchronous delivery can return inline PDF bytes when inline_file is selected, or a JSON result with secure/direct artifact delivery metadata. Async delivery returns job and artifact metadata. Request-level usage remains available in APIRAPTOR logs.

How it works

  1. Your application posts HTML and render options to the endpoint.
  2. APIRAPTOR renders the document in an isolated rendering pipeline with execution limits.
  3. The generated PDF is delivered through the selected secure, direct or inline delivery mode and usage is recorded against your account.

API documentation

Review endpoint parameters, request/response examples, error codes and execution notes in the technical API reference.

View API docs

Related APIs

Start using this service

Continue with endpoint details in documentation or open your workspace in the dashboard to run live requests.

Syncing service registry...