Authentication
Required headers
All endpoints (except /health and this page) require the API key. For encrypted PDFs, optionally pass the PDF password via X-Pdf-Key (overrides PDF_KEY_DEFAULT env).
curl -H "X-Api-Key: your-key" \ -H "X-Pdf-Key: pdf-password" \ https://formsonfire.corncreeker.com/pdf/...
Input formats
Every endpoint accepts both multipart/form-data and application/json with base64-encoded PDFs. Encrypted PDFs are auto-decrypted via X-Pdf-Key or PDF_KEY_DEFAULT.
# multipart file=@document.pdf # JSON base64 "pdf": "JVBERi0x..." "password": "optional"
Endpoints
Extract metadata from a PDF — title, author, page count, creation date and more.
Inspect all form fields in a PDF — name, type, current value and options.
Fill form fields by name. Supports text, checkboxes, radio buttons and dropdowns. Returns the modified PDF.
Flatten a filled PDF — converts form fields into static content, making the document non-editable.
Create a blank PDF, optionally with custom text content. Returns a new PDF document.
Merge multiple PDFs into a single document. Send multiple files or a base64 array.
Generate a structured PDF form from a JSON schema — define pages, fields, layout and types declaratively.
Set PDF document metadata fields (title, author, subject, keywords, creator, producer). Partial updates supported — only provided fields are changed. Works on encrypted PDFs via auto-decrypt.
Embed a JSON object as XMP metadata into a PDF using a custom namespace. Non-destructive — content is untouched.
Read back the embedded JSON metadata from a PDF's XMP stream. Returns the original JSON object.
Check which signature fields in a PDF are signed. Returns per-field status and an allSigned boolean. Optional ?fieldPattern= query param to match custom field names.
Render a PDF page as a PNG image. Returns the image as base64. Optional ?page= query param (default: 1).
List all embedded file attachments in a PDF — returns filename and size for each. Attachments are separate from XMP metadata.
Read a named embedded file attachment from a PDF. Returns the file content as base64. Required: filename.
Embed a file as a PDF attachment (upsert — replaces if name already exists). Mime-type is guessed from file extension. Returns updated PDF.
Health check endpoint. No API key required. Returns {"status":"ok"}.