API Docs

One endpoint for HTML to PDF. Sign in, create a key, POST your document.

Quickstart

  1. Sign in and create an API key in the dashboard.
  2. Send HTML with Authorization: Bearer <key>.
  3. Save the response body as a PDF file.
curl -X POST "https://pdfgen2.novtopro.com/api/v1/pdf?page-size=A4" \
  -H "Authorization: Bearer pk_live_xxx" \
  -H "Content-Type: text/html" \
  --data-binary @invoice.html -o out.pdf

Authentication

Every convert call needs an API key from your dashboard. Pass it as a Bearer token.

Authorization: Bearer pk_live_...

Convert

POST /api/v1/pdf

POST HTML (or JSON with html/url). Response is application/pdf.

Query parameters

ParamDescription
page-sizePaper size, e.g. A4, Letter.
orientationPortrait or Landscape.
margin-*margin-top, margin-right, margin-bottom, margin-left (e.g. 12mm).
engineOptional. boxpdf (default), sghtmltopdf, or prince.

Request body

text/html: raw UTF-8 HTML in the body.

application/json: use html or url. Optional page_size, landscape, margins.

{
  "html": "<h1>Invoice</h1>",
  "page_size": "A4",
  "landscape": false,
  "margins": { "top": "12mm", "right": "12mm", "bottom": "12mm", "left": "12mm" }
}

No JavaScript execution. Stick to document CSS: flow, tables, page breaks.

Account

GET /api/v1/me

Returns your plan and usage for the current month. Same Bearer auth.