API Docs

HTML or Markdown in; PDF, EPUB, MOBI or AZW3 out. 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://docgen.novtopro.com/api/v1/pdf" \
  -H "Authorization: Bearer dk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Invoice</h1>","engine":"tiger"}' -o out.pdf

Authentication

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

Authorization: Bearer dk_live_...
# or: X-Api-Key: dk_live_...

Convert

POST /api/v1/pdf

POST a JSON body (Content-Type: application/json). The response is the PDF (application/pdf).

Body fields

ParamDescription
html / urlRequired, exactly one: html (a string) or url (a public http(s) page; redirects are not followed).
cssOptional. Added before the HTML as a <style> block.
enginetiger · lion · wolf. Optional; tiger is the default. The free plan includes Tiger only. PDF engines
pageSizeTiger only: letter, a4, legal or tabloid; overrides CSS @page size (default Letter). On Lion and Wolf, use CSS @page size.
orientationTiger only: portrait (default) or landscape.
marginsTiger only, in points (1/72 in): one number for every side, or an object with top/right/bottom/left; overrides CSS @page margin (default 40). On Lion and Wolf, use CSS @page margin.
titleOptional. Sets the PDF document title.

Example

{
  "html": "<h1>Invoice</h1>",
  "css": "h1 { color: #12201c }",
  "engine": "tiger",
  "pageSize": "a4",
  "orientation": "portrait",
  "margins": { "top": 12, "right": 12, "bottom": 12, "left": 12 }
}

No JavaScript is run, and remote assets load only from public addresses. See PDF engines for what each engine supports.

Guide: HTML invoice to PDF with one API call

PDF engines

Choose one per request with the engine field. All three share the floor below; the table shows where they differ.

What every engine shares

  • No browser: HTML + CSS go straight to PDF.
  • No JavaScript - scripts are skipped
  • Remote http(s) images, stylesheets and fonts load from public addresses only; private, loopback and cloud-metadata addresses are refused. data: URIs always work.
  • No AcroForm, PDF/A, or encryption
  • Asking for an engine your plan doesn't include fails the conversion; there is no silent fallback.

Guide: HTML to PDF without headless Chrome or Puppeteer

Compare

TigerLionWolf
Best for

Short, simple invoices and receipts; quick drafts.

Multi-page invoices and reports; CJK text.

Documents with the strictest print layout.

CSS & pagination

CSS subset, read from the css field and <style> only (<link> stylesheets are ignored): no multi-column, shadows, filters or animations; gradients render as their first color.

@page size and margin, @top-* / @bottom-* boxes and page counters (default Letter, 40pt margins); page size, orientation and margins in the request win. Table headers repeat on every page. No forced page breaks or :first / :left / :right pages.

Fuller CSS than Tiger: @page size, margins, headers, footers and page counters (default A4, 1in margins); break-before/after/inside; table headers repeated on every page.

The most complete CSS pagination of the three: @page size and margins (default Letter, 54pt margins), running headers and footers, page counters, repeated table headers, break control. Gradients, multi-column, inline <svg>, GIF and WOFF/WOFF2 fonts work.

Watch out for

Fonts: Helvetica, or Noto Sans JP when the text has characters beyond Latin-1. font-family and @font-face are ignored.

Images: PNG / JPEG from data: or public http(s) URLs, in <img> or CSS backgrounds (no redirects, up to 5 MB each). SVG, WebP, GIF and inline <svg> are left blank.

Heavier than Tiger. No gradients, multi-column, sticky, filters, animations or vertical text.

Images: PNG / JPEG / WebP / SVG via <img> or CSS - no GIF, no inline <svg>. Fonts: TTF/OTF via @font-face - no WOFF/WOFF2.

Heavier than Tiger. Built for print: screen-only CSS such as animations and sticky has no effect.

Plan

All plans · default

Pro

Pro

Same invoice, three engines

One two-page invoice, identical HTML + CSS, sent through the API once per engine. Pages 1 and 2, no watermark.

Pages 1 and 2 of the sample invoice rendered by Tiger
Tiger Title, invoice dates, running header, page numbers and the repeated table header all render. PDF
Pages 1 and 2 of the sample invoice rendered by Lion
Lion Title, invoice dates, running header, page numbers and the repeated table header all render. PDF
Pages 1 and 2 of the sample invoice rendered by Wolf
Wolf Title, invoice dates, running header, page numbers and the repeated table header all render. PDF

Ebooks & Markdown

POST /api/v1/epub POST /api/v1/mobi POST /api/v1/azw3

Ebook endpoints need html and a non-empty title; css, author and cover are optional. The response is the EPUB, MOBI or AZW3 file.

{
  "html": "<h1>Chapter 1</h1><p>…</p>",
  "title": "Field Notes",
  "author": "Ada Lovelace"
}

POST /api/v1/markdown

/markdown needs markdown (GitHub-flavored) and takes optional css. The response is HTML.

{ "markdown": "# Invoice\n\n| Item | Qty |\n|---|---|\n| Pens | 2 |" }

Every format uses the same API key and draws from the same monthly conversions.

Guide: Markdown to Kindle: EPUB, MOBI and AZW3 via API

Account

GET /api/v1/me

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

Errors

A failed call returns a non-2xx status and a JSON body naming the reason. Failed conversions are never retried or moved to another engine.

HTTP/1.1 429 Too Many Requests
{ "error": "quota_exceeded" }
StatusCodeDescription
400invalid_jsonhtml_requiredtitle_requiredmarkdown_requiredambiguous_sourceurl_invalidurl_not_allowedInvalid JSON, a missing field, both html and url sent, or a url that is not allowed.
401missing_api_keyinvalid_api_keyThe API key is missing or not valid.
403account_canceledengine_not_allowedThe account is canceled, or the engine is not on your plan.
413body_too_largeThe body, or the page fetched from url, is over your plan’s size limit.
429quota_exceededrate_limit_exceededMonthly conversions used up, or the per-minute rate reached. The Retry-After header gives the seconds until you can retry: to the next minute, or to the start of next month (UTC).
502conversion_failedurl_fetch_failedThe engine could not produce the file, or the url could not be fetched.