Documentation Playground
Docs / Data Source
Data Sources

Data Sources Overview

PDFKong is powered by multiple conversion engines. Depending on your use-case, you can feed data into the API via HTML, live URLs, Markdown, Office files, or dynamic Liquid batch templates.

Select Engine

HTML to PDF

The standard and most robust method. Send a raw HTML string—complete with inline CSS or external links—and receive a perfectly formatted PDF.

{ "html": "<h1>Invoice</h1>" }

URL to PDF

Capture any live, publicly accessible website. Our Chromium engine will navigate to the URL, wait for resources to load, and print the page.

{ "url": "https://dashboard.example.com" }

Markdown to PDF

Send raw Markdown text and get a beautiful, GitHub-styled PDF automatically. Perfect for converting READMEs or simple text documents.

{ "markdown": "# Title\n\n**Bold** text." }

Office to PDF

Upload Word documents (.docx), Excel sheets, or PowerPoint presentations using multipart/form-data. Our LibreOffice engine handles the rest natively.

curl -F "file=@report.docx" ...

Batch Generation (Liquid)

Need 10,000 personalized invoices? Send one HTML template with Liquid variables and an array of JSON data. We'll return a ZIP file containing all generated PDFs.

{ "parse_liquid": true, "html": "Hi {{ name }}", "liquid_data": [{"name":"John"}, {"name":"Jane"}] }