Skip to Content
NexPDF

HTML to PDF

Render invoices, reports and letters from your own HTML.

English

Send an HTML page as a file and name it in an html part of a build.

For safety, the page cannot load anything: external images, style sheets, fonts and scripts are skipped. Put styles in a <style> element and images as data: URLs.

Cost: 1 unit per file.

Render a page

curl https://api.nexpdf.dev/v1/build \
  -H "Authorization: Bearer $NEXPDF_API_KEY" \
  -F invoice=@invoice.html \
  -F 'instructions={
    "parts": [
      {
        "html": "invoice"
      }
    ],
    "output": {
      "type": "pdf"
    }
  }' \
  -o invoice.pdf

Tips

  • Add a cover or an appendix by listing more parts: html and file parts can be mixed.
  • Apply actions to the result in the same call: a watermark, PDF/A for archiving, encryption.

On this page