picture_as_pdf

HTML to PDF

Operational

Convert HTML markup or live URLs to pixel-perfect PDFs

api API Docs

API Overview

The HTML to PDF API renders HTML to PDF with full CSS3 and JavaScript support using a headless browser engine at the edge. You can submit raw HTML markup or point to any public URL. Control page dimensions (A4, Letter, custom), set margins, inject custom headers and footers with page numbers, and configure the viewport width. Ideal for generating invoices, reports, statements, and any document that lives first as HTML.

picture_as_pdf

Full CSS3 Rendering

Headless browser engine renders fonts, flexbox, and custom styles with pixel-perfect accuracy.

language

URL or HTML Input

Convert any public URL or submit raw HTML — both modes return a base64-encoded PDF.

article

Custom Headers & Footers

Inject headers, footers, and automatic page numbers for professional document output.

bolt

Instant Response

Synchronous API — receive your PDF inline without polling or webhooks.

integration_instructions API Reference

terminal API Playground

Live Simulation
import requests

url = "https://api.picopayd.codefission.co.uk/document/api/convert"
headers = {
    "Content-Type": "application/json",
    "X-PAYMENT": "<402-payment-token>"
}
payload = {
    "type": "html",
    "content": "<h1>Invoice #1234</h1><p>Amount due: $99.00</p>",
    "options": {"format": "A4"}
}

response = requests.post(url, json=payload, headers=headers)
data = response.json()
print(f"Pages: {data['pages']}, Size: {data['sizeBytes']} bytes")
Response Body 200 OK
{
  "success": true,
  "pdf": "JVBERi0xLjQKJe...",
  "encoding": "base64",
  "pages": 1,
  "sizeBytes": 14320
}