SublimePDF and PDFShift both turn HTML into PDF over an HTTP API, and both let you store a template and generate documents from it with data. The differences are in the details a developer integrates against: how data is bound to a template, what else the API does besides rendering, how output is delivered, how much guidance there is for AI agents, and how each vendor counts and prices usage.
PDFShift facts on this page come only from PDFShift's own public pages, read on 23 November 2026 and linked under sources. Vendors change prices and features, so check those pages before you decide. We did not call the PDFShift API, so this page makes no claims about relative speed or output quality. The last section explains how to test both with the same fixtures. If you are comparing a PDF API against manual, browser-based PDF tools instead, see SublimePDF vs Smallpdf.
At a glance
| SublimePDF | PDFShift | |
|---|---|---|
| Render from HTML | POST /html-to-pdf with html, optional data for placeholders, and options | POST /v3/convert/pdf with source (HTML or a URL) and options |
| Render from a URL | POST /url-to-pdf | Same convert call; source is detected as a URL |
| Stored templates | Saved in the app or with POST /templates; POST /templates/{id}/generate with JSON data | POST /templates (slug, name, HTML content); POST /templates/{slug}.{ext} "generates a document from a template using provided data" |
| Placeholder syntax | Handlebars-compatible ({{customer.name}}, {{#each}}, {{#if}}) | Not named in the published reference |
| Output formats | PDF from the convert call; separate PNG, JPEG and WEBP endpoints; templates also to HTML, PNG, JPEG or WEBP | |
| Authentication | Authorization: Bearer <API key> | X-API-Key header |
| Other PDF operations | /merge, /split, /compress endpoints | Watermark and password protection as options on the convert call |
| Async | Optional webhook_url notification | webhook parameter; the API answers 202 and queues the job |
| Idempotent retries | Idempotency-Key header on render requests | Not found in the convert reference |
| Agent guidance | Documented generate_pdf tool for function calling; optional self-run MCP server | No agent or MCP pages in the documentation index |
| Rendering engine stated | Not specified in the published API contract | "Powered by Chromium"; X-Processor-Version selects Chromium "116" or "142" |
| Entry paid plan (listed) | Developer, $29/month, 1,000 renders | Starter, $9/month, 500 credits |
Sending HTML on each request
Both APIs accept the finished HTML in the request. This PDFShift example follows its API reference. We did not run it:
curl -X POST https://api.pdfshift.io/v3/convert/pdf \
-H "X-API-Key: YOUR_PDFSHIFT_KEY" \
-H "Content-Type: application/json" \
-d '{"source": "<html><body><h1>Invoice INV-2026-0142</h1></body></html>", "format": "A4"}' \
-o invoice.pdfsource is the only required field. PDFShift's reference says it "will automatically detect if it's an URL and load it, or an HTML document". If your HTML contains values from your database or users, you build and escape it in your own code before the call.
With SublimePDF you can send the same kind of finished HTML, or send the HTML together with a data object and let Handlebars-style placeholders in the HTML be filled before rendering. In Handlebars, a double-brace {{value}} placeholder HTML-escapes the value, so a customer name containing markup prints as text. Check that your SublimePDF templates behave the same way before you rely on it.
Stored templates with data
Both vendors also let you store a template and send only data on each call.
PDFShift documents POST /templates with a slug, a name and the HTML content, plus endpoints to list, read, update and delete templates. Its "Generate document from template" endpoint, POST /templates/{slug}.{ext}, "Generates a document from a template using provided data" as HTML, PDF, JPEG, PNG or WEBP. The published reference does not expand the request body or name the placeholder syntax, so read PDFShift's current documentation or ask PDFShift before you design templates around it.
SublimePDF documents the whole contract: templates are HTML and CSS with Handlebars-compatible placeholders, created and previewed in the app or with POST /templates, and rendered with POST /templates/{id}/generate and a JSON data object. The template variables guide covers loops, conditional sections, escaping and missing values, with tested outputs.
This script renders the sample invoice through SublimePDF either way. Download template.html and data.json, set SUBLIMEPDF_API_KEY, and run it with Node.js 18 or later (save it as render-invoice.mjs). It sends the HTML with the data, or, if SUBLIMEPDF_TEMPLATE_ID is set, only the data to your saved copy of the template:
import { readFile, writeFile } from "node:fs/promises";
const apiBase = process.env.SUBLIMEPDF_API_BASE_URL ?? "https://api.sublimepdf.com/v1";
const apiKey = process.env.SUBLIMEPDF_API_KEY;
if (!apiKey) throw new Error("Set SUBLIMEPDF_API_KEY");
const data = JSON.parse(await readFile("data.json", "utf8")); // { seller, customer, invoice, items, ... }
const templateId = process.env.SUBLIMEPDF_TEMPLATE_ID;
const [path, body] = templateId
? [`/templates/${encodeURIComponent(templateId)}/generate`, { data }]
: ["/html-to-pdf", { html: await readFile("template.html", "utf8"), data }];
const res = await fetch(apiBase + path, {
method: "POST",
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(`SublimePDF ${res.status}: ${await res.text()}`);
await writeFile("invoice.pdf", Buffer.from(await res.arrayBuffer()));
console.log("Saved invoice.pdf");Your code computes totals and formats values in both cases; the template only lays them out. The invoice template page shows the template, its sample data and the PDF it produces.
HTML per request or a stored template?
- Who edits the layout. With HTML per request, layout changes ship with your application code and go through your normal review. With a stored template, someone can adjust the layout without a deploy, as long as the data fields stay the same.
- What crosses the wire. HTML per request sends the full document every time. A template call sends only the data, which keeps requests small and keeps layout out of logs and prompts.
- Escaping. When you build HTML yourself, you must escape user-supplied values. When the API fills placeholders, check how its syntax escapes values.
AI agents and tool calling
Both APIs can sit behind an agent tool, because any HTTP API can. What differs is the documentation you start from.
SublimePDF's agent quickstart defines a generate_pdf tool that takes either a template ID with JSON data or a complete HTML document. Your executor holds the API key, validates the arguments, calls the API and returns a document reference to the model. The page includes the JSON Schema, tested TypeScript and Python executors, and error handling. MCP hosts can use the same executor through an optional self-run MCP server; plain function calling works without it.
PDFShift's documentation index lists no agent-specific or MCP pages. That does not mean PDFShift cannot be used from an agent. It means you would write the tool definition and executor yourself.
Output, delivery and options
| Capability | SublimePDF (documented contract) | PDFShift (API reference) |
|---|---|---|
| Paper size | options.format A4, Letter, Legal; CSS @page size takes precedence when present | format with named sizes (A0 to A5, Letter, Legal, Tabloid, Ledger) or custom {width}x{height} |
| Orientation, margins, scale | options.landscape, options.margin, options.scale (0.1 to 2) | landscape, margin, zoom (0.1 to 2) |
| Headers and footers | options.headerTemplate, options.footerTemplate, or CSS @page margin boxes | header / footer objects with variables such as page number and total |
| Waiting for content | options.waitFor (CSS selector or milliseconds) | delay, wait_for (a global function), wait_for_network |
| Inject CSS or JavaScript | Put it in the HTML or template | css and javascript parameters |
| Watermark, password protection | Not part of the render options | watermark and protection parameters |
| Delivery | PDF bytes in the response; optional webhook_url | PDF bytes; or JSON with a hosted URL when filename is set (kept for 2 days, then deleted); s3_destination for your own bucket; webhook |
| Merge, split, compress | Separate endpoints | Not in the convert reference |
| Test mode | Not documented | sandbox: conversions do not use credits and the PDF is watermarked |
| Idempotent retries | Idempotency-Key header on render requests | Not found in the convert reference |
Data handling is worth checking against your own requirements. PDFShift's homepage says that "By default, we don't store your documents or requests", and its convert reference says files delivered through its hosted URL are deleted after 2 days. Both vendors store templates you choose to save, because that is what makes them reusable. See the security page for how SublimePDF handles data.
Listed pricing
SublimePDF prices are from its pricing page. PDFShift prices are as listed on its pricing page on 23 November 2026. Units differ: SublimePDF counts renders. PDFShift counts credits, where "One credit is consumed per document, counted per 5 MB of generated data".
| SublimePDF plan | Price | Included | Rate limit |
|---|---|---|---|
| Developer | $29/month | 1,000 renders/month | 100 requests/minute |
| Business | $99/month | 10,000 renders/month | 500 requests/minute |
| Enterprise | Custom | Agreed per contract | Agreed per contract |
SublimePDF's browser tools on /tools need no account or plan.
| PDFShift plan | Monthly | Credits/month | Overage per credit |
|---|---|---|---|
| Free | $0 | 50 | — |
| Starter | $9 | 500 | $0.04 |
| Boost | $24 | 2,500 | $0.03 |
| Growth | $39 | 5,000 | $0.025 |
| Business | $99 | 25,000 | $0.02 |
| Shift 50k to Shift 1M | $149 to $999 | 50,000 to 1,000,000 | $0.015 to $0.001 |
PDFShift also lists annual billing as "10 months for the price of 12 (two months free)", says unused credits do not roll over, and offers custom plans above one million credits. Its paid plans list a 100-second timeout that can be raised on request, and the free plan a 30-second timeout and a 15 MB file size limit.
For a rough comparison at two volumes, assuming every document is under 5 MB (one PDFShift credit each):
- 1,000 documents a month: SublimePDF Developer is $29. PDFShift Boost is $24, with room for 2,500.
- 10,000 documents a month: SublimePDF Business is $99. PDFShift Business is $99, with room for 25,000.
On listed prices alone, PDFShift includes more documents per dollar at these volumes. The comparison that matters for your project also includes what each call has to carry (a full HTML document or only data), how clearly the template contract is documented, whether you need merge, split and compress in the same API, and how much agent tooling you want to start from.
When PDFShift may fit better
- You mainly convert existing web pages by URL, or your application already produces finished HTML.
- You need image output (PNG, JPEG or WEBP) from the same API as your PDFs.
- You want hosted download links or direct S3 delivery from the conversion call itself.
- You need watermarking or password protection applied as part of the same request.
- You run high volumes and the per-credit price is the deciding factor. PDFShift lists plans up to one million credits a month.
- You want a sandbox mode that does not consume credits while you integrate.
When SublimePDF may fit better
- You want HTML and data, or a template ID and data, as equal options with a documented Handlebars-compatible syntax for loops, conditional sections and escaping.
- You generate the same kinds of documents repeatedly (invoices, reports, statements) and want templates you can save and preview in the app, alongside HTML your code sends.
- AI agents create the documents, and you want a documented tool definition and executor to start from, with MCP as an option rather than a requirement.
- You want merge, split and compress endpoints and an
Idempotency-Keyheader for safe retries in the same API.
How to compare them yourself
A fair test uses the same input on both services:
- Take the fixtures from our HTML-to-PDF rendering benchmark. They include an invoice, a 60-line invoice, a two-page report and twelve CSS feature tests, each with an automated check.
- Render each fixture through both APIs from the region where your servers run, with matching options (A4, backgrounds on, CSS page size honoured).
- Compare page count, page size, repeated table headers, footers and page numbers, embedded fonts and file size, and time the full request including upload and download.
- Read each vendor's current terms on retention, limits and pricing for your volume.
The benchmark article reports how local Chromium and WebKit builds handle those fixtures. It does not include either hosted API.
Sources
- PDFShift pricing · accessed 23 November 2026
- PDFShift homepage · accessed 23 November 2026
- PDFShift documentation: Convert to PDF (API reference) · accessed 23 November 2026
- PDFShift documentation: Authentication · accessed 23 November 2026
- PDFShift documentation: Sandbox mode · accessed 23 November 2026
- PDFShift documentation: Create template · accessed 23 November 2026
- PDFShift documentation: Generate document from template · accessed 23 November 2026
- PDFShift documentation index (llms.txt) · accessed 23 November 2026
- PDFShift documentation: Introduction · accessed 23 November 2026
- Handlebars: Expressions (HTML escaping) · accessed 23 November 2026