Tailprint
Allows rendering raw HTML styled with Tailwind CSS utility classes into vector PDFs or high-resolution social preview images, with built-in Tailwind JIT compilation and no build step.
Tailprint β Developer-First PDF & Document Engine, TypeScript SDK & MCP Server
Tailprint (tailprint.com) is the developer-first programmable PDF and document engine. It turns Tailwind HTML, dynamic JSON data, and AI prompts into pixel-perfect vector PDFs, legally compliant European Factur-X / ZUGFeRD hybrid e-invoices, and provides complete PDF manipulation operations (merge, split, fill forms, watermark, compress, validate).
Organized into two core pillars:
Document & Compliance Suite: Vector HTML-to-PDF, Smart Pagination Shield, EU Factur-X / ZUGFeRD e-invoicing (generation & validation), and REST PDF operations (merge, split, fill AcroForms, stamp watermarks, stream compression).
AI & Developer Infrastructure: Zero-dependency isomorphic TypeScript SDK (
npm install tailprint) and Model Context Protocol (MCP) server for Claude Desktop, Cursor, and Windsurf (npx tailprint), with zero-retention GDPR privacy mode.
β‘ Highlights
Tailwind-Native: Built-in Tailwind CSS JIT compilationβno build step, PostCSS config, or bundling required.
European E-Invoicing (Factur-X / ZUGFeRD / EN 16931): Generates legally compliant hybrid PDF/A-3 invoices with embedded CrossIndustryInvoice XML and validates invoices against EN 16931 standards.
Complete PDF Operations: Merge multiple PDFs, split page ranges, fill interactive AcroForm fields, compress file size, and stamp watermarks/page numbers.
Official TypeScript / Node.js SDK: Isomorphic, zero external runtime dependencies, native
fetchsupport for Node.js, Next.js, Bun, Deno, and Cloudflare Workers.Model Context Protocol (MCP): Connects natively to Claude Desktop, Cursor, Windsurf, and autonomous AI agents exposing 11 document & PDF tools via Stdio or Remote SSE.
Sub-800ms Playwright Engine: Pre-warmed Chromium instances with isolated browser contexts and strict concurrency throttling (
p-limit).Smart Pagination Shield: Prevents orphaned lines, awkward page breaks, and split table rows across document pages.
Zero-Retention Mode: Complete in-memory ephemeral rendering with
no_store: true.SSRF & Network Sandboxing: Automatically blocks local and private IP ranges (
127.0.0.1,10.0.0.0/8,169.254.169.254, etc.).
Related MCP server: readable-mcp
π¦ Official TypeScript / Node.js SDK
Tailprint provides an official zero-dependency isomorphic SDK for Node.js, Next.js, Bun, Deno, and Cloudflare Workers:
npm install tailprintSDK Quickstart
import { Tailprint } from 'tailprint';
const tp = new Tailprint({
apiKey: process.env.TAILPRINT_API_KEY, // Or pass directly
});
// 1. Render Tailwind HTML to vector PDF
const { buffer } = await tp.renderPdf({
html: `
<div class="p-12 bg-slate-900 text-white font-sans">
<h1 class="text-3xl font-bold text-indigo-400">Quarterly Report</h1>
<p class="text-slate-400 mt-2">Rendered with Tailwind CSS & Playwright.</p>
</div>
`,
format: 'A4',
});
// 2. Merge multiple PDFs
const merged = await tp.mergePdfs({
pdfs: [bufferA, bufferB],
});
// 3. Stamp Watermark / Page Numbers
const stamped = await tp.stampPdf({
pdf: buffer,
text: 'CONFIDENTIAL',
opacity: 0.2,
diagonal: true,
});
// 5. Asynchronous Rendering & Webhook Delivery
const job = await tp.renderPdfAsync({
html: '<h1>Heavy 100-page Annual Report</h1>',
webhook_url: 'https://my-app.com/api/webhooks/pdf',
});
// Or poll until finished:
const completedJob = await tp.waitForJob(job.job_id);
console.log('PDF Ready at:', completedJob.results[0].download_url);
// 6. Concurrent Batch Rendering with Automatic Merging
const batchJob = await tp.renderBatch({
items: [
{ html: '<h1>Invoice #101</h1>', filename: 'inv-101.pdf' },
{ html: '<h1>Invoice #102</h1>', filename: 'inv-102.pdf' },
],
merge_output: true,
merged_filename: 'all-invoices.pdf',
webhook_url: 'https://my-app.com/api/webhooks/pdf',
});
console.log('Batch Queued:', batchJob.job_id);π Official Python SDK
Tailprint provides an official zero-dependency Python client for Django, FastAPI, Flask, Celery, and AI workflows:
pip install tailprintPython Quickstart
import os
from tailprint import Tailprint
tp = Tailprint(api_key=os.environ.get("TAILPRINT_API_KEY", "sec_live_..."))
# 1. Render Tailwind HTML to Vector PDF
pdf_bytes = tp.render_pdf(
html="""
<div class="p-12 bg-slate-900 text-white font-sans">
<h1 class="text-3xl font-bold text-indigo-400">Quarterly Invoice</h1>
<p class="text-slate-400 mt-2">Styled dynamically with Tailwind CSS.</p>
</div>
""",
format="A4",
)
with open("invoice.pdf", "wb") as f:
f.write(pdf_bytes)
# 2. Asynchronous Render & Webhook
job = tp.render_pdf_async(
html="<h1>Annual Report</h1>",
webhook_url="https://my-app.com/api/webhooks",
)
completed = tp.wait_for_job(job["job_id"])
print("PDF ready at:", completed["results"][0]["download_url"])
# 3. Batch Rendering with Merging
batch = tp.render_batch(
items=[
{"html": "<h1>Invoice 1</h1>", "filename": "inv-1.pdf"},
{"html": "<h1>Invoice 2</h1>", "filename": "inv-2.pdf"},
],
merge_output=True,
merged_filename="combined.pdf",
)π Official PHP & Laravel SDK (sdk/php)
Zero-dependency PHP 8.1+ client with first-class Laravel ServiceProvider, Tailprint Facade, Blade view() support, and fluent ->download() / ->stream() responses:
composer require tailprint/tailprintuse Tailprint\Laravel\Facades\Tailprint;
// Render a hosted template directly to a Laravel HTTP download response
return Tailprint::template('invoice-modern', [
'invoice_number' => 'INV-2026-1042',
'issue_date' => '2026-11-13',
'seller' => ['name' => 'Tailprint ApS'],
'buyer' => ['name' => 'Acme GmbH'],
'items' => [['description' => 'Pro Plan', 'quantity' => 1, 'unit_price' => 49]],
])->download('invoice.pdf');
// Or render a Laravel Blade view with Tailwind CSS
return Tailprint::view('pdfs.invoice', ['order' => $order])->stream('invoice.pdf');See sdk/php/README.md for full documentation.
πΉ Official Go SDK (sdk/go)
Zero-dependency, context-aware Go client (go >= 1.21):
go get github.com/coheroseb/tailprint/sdk/go@v1.4.0client := tailprint.NewClient(os.Getenv("TAILPRINT_API_KEY"))
pdfBytes, err := client.RenderTemplate(ctx, "invoice-modern", map[string]any{
"invoice_number": "INV-2026-1042",
"issue_date": "2026-11-13",
"seller": map[string]any{"name": "Tailprint ApS"},
"buyer": map[string]any{"name": "Acme GmbH"},
"items": []map[string]any{{"description": "Pro Plan", "quantity": 1, "unit_price": 49}},
}, nil)See sdk/go/README.md for full documentation.
π€ Model Context Protocol (MCP) Setup
Tailprint provides an official, 100% spec-compliant MCP server exposing 11 Document & PDF Tools enabling AI coding assistants and autonomous agents to generate and inspect documents on command.
11 Document & PDF Tools Catalog
Tool | Category | Returns | Description |
| Documents | PDF Link + Base64 | Renders Tailwind HTML or URL to vector PDF with custom headers/footers. |
| Compliance / EU | Hybrid PDF + XML | EU EN 16931 / Factur-X / ZUGFeRD compliant hybrid e-invoice. |
| Document Ops | PDF Link + Base64 | Merges two or more PDFs into a single unified vector PDF. |
| Document Ops | PDF Link + Base64 | Extracts specific pages or page ranges (e.g. "1-3, 5, 8-10"). |
| Document Ops | PDF Link + Base64 | Fills interactive AcroForms with fields/checkboxes and flattening. |
| Document Ops | PDF Link + Base64 | Compacts and shrinks PDF file size via stream object bundling. |
| Security | PDF Link + Base64 | Stamps diagonal watermarks (e.g. CONFIDENTIAL, DRAFT) or page numbers. |
| Keynotes | 16:9 PDF + Preview | Converts Markdown slides into widescreen 16:9 presentation PDFs. |
| Automation | PDF Link + Base64 | Renders pre-built Tailwind templates with dynamic data substitution. |
| Automation | JSON Catalog | Lists all available templates in the Tailprint document catalog. |
| Automation | HTML Source | Retrieves full template source code for LLM inspection. |
1. Claude Desktop Setup
Add this to your Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"tailprint": {
"command": "npx",
"args": ["-y", "tailprint"],
"env": {
"TAILPRINT_API_KEY": "YOUR_TAILPRINT_API_KEY"
}
}
}
}2. Cursor IDE & Windsurf Setup
In Cursor:
Open Settings β Features β MCP Servers.
Click Add New MCP Server.
Name:
tailprintType:
sseURL:
https://tailprint.com/v1/mcp/sse?api_key=YOUR_TAILPRINT_API_KEY
π° Pricing & Plans
Tier | Price | Monthly Limit | Features |
Developer Free | $0 | 100 renders | No credit card required. Full Tailwind support, MCP access. |
Starter | $19 / mo | 3,000 renders | Ideal for solo developers, indie projects, and small stores. |
Pro (Most Popular) | $49 / mo | 25,000 renders | Prioritized Chromium queue, EU Factur-X hybrid e-invoicing. |
Business / Scale | $119 / mo | 100,000 renders | Elevated concurrency pool reservation, multi-key team access. |
Enterprise | $299 / mo | 250,000+ renders | Dedicated browser instances, 99.9% uptime SLA, Slack channel. |
π REST API Quickstart
1. Claim a Free API Key (No Credit Card)
curl -X POST https://tailprint.com/v1/auth/claim-free-key \
-H "Content-Type: application/json" \
-d '{"email":"your-email@example.com"}'2. Render HTML to Vector PDF
curl -X POST https://tailprint.com/v1/render/pdf \
-H "Authorization: Bearer sec_live_..." \
-H "Content-Type: application/json" \
-d '{
"html": "<div class=\"p-12 bg-slate-900 text-white font-sans\"><h1 class=\"text-3xl font-bold text-indigo-400\">Invoice #1042</h1><p class=\"text-slate-400 mt-2\">Styled dynamically with Tailwind CSS.</p></div>",
"format": "A4",
"landscape": false
}' \
--output invoice.pdf3. Generate Factur-X / PEPPOL European E-Invoice
curl -X POST https://tailprint.com/v1/render/einvoice \
-H "Authorization: Bearer sec_live_..." \
-H "Content-Type: application/json" \
-d '{
"invoiceNumber": "INV-2026-0042",
"currency": "EUR",
"seller": { "name": "Acme Nordic ApS", "country": "DK", "vatId": "DK12345678" },
"buyer": { "name": "Global Logistics GmbH", "country": "DE", "vatId": "DE987654321" },
"lineItems": [{ "name": "Consulting Services", "quantity": 10, "unitPrice": 150.00, "vatRate": 25 }],
"store": true
}'4. Validate Factur-X / ZUGFeRD E-Invoice
curl -X POST https://tailprint.com/v1/pdf/validate-einvoice \
-H "Authorization: Bearer sec_live_..." \
-H "Content-Type: application/json" \
-d '{
"pdf": "https://example.com/invoice.pdf"
}'5. Merge Multiple PDFs
curl -X POST https://tailprint.com/v1/pdf/merge \
-H "Authorization: Bearer sec_live_..." \
-H "Content-Type: application/json" \
-d '{
"pdfs": ["https://example.com/cover.pdf", "https://example.com/report.pdf"]
}' \
--output merged.pdf6. Stamp Watermark
curl -X POST https://tailprint.com/v1/pdf/stamp \
-H "Authorization: Bearer sec_live_..." \
-H "Content-Type: application/json" \
-d '{
"pdf": "https://example.com/contract.pdf",
"text": "CONFIDENTIAL",
"opacity": 0.2,
"diagonal": true
}' \
--output stamped.pdf7. Asynchronous Batch Rendering & Webhook
curl -X POST https://tailprint.com/v1/render/batch \
-H "Authorization: Bearer sec_live_..." \
-H "Content-Type: application/json" \
-d '{
"items": [
{ "html": "<h1>Invoice #101</h1>", "filename": "inv-101.pdf" },
{ "html": "<h1>Invoice #102</h1>", "filename": "inv-102.pdf" }
],
"merge_output": true,
"merged_filename": "all-invoices.pdf",
"webhook_url": "https://my-app.com/api/webhooks/pdf"
}'8. Hosted Templates (JSON in, PDF out)
Send template_id + data instead of HTML. Totals are computed server-side and all values are HTML-escaped.
# Browse templates (no API key required)
curl https://tailprint.com/v1/templates
curl https://tailprint.com/v1/templates/invoice-modern # example_data + example_request
curl -X POST https://tailprint.com/v1/render/pdf \
-H "Authorization: Bearer sec_live_..." \
-H "Content-Type: application/json" \
-d '{
"template_id": "invoice-modern",
"data": {
"invoice_number": "INV-1042",
"issue_date": "2026-11-13",
"currency": "EUR",
"seller": { "name": "Tailprint ApS" },
"buyer": { "name": "Cohero Technologies" },
"items": [{ "description": "API Subscription", "quantity": 1, "unit_price": 49 }],
"tax_rate": 25
}
}' --output invoice.pdfAvailable: invoice-modern, receipt-minimal, certificate-classic, report-executive. Also usable per item in /v1/render/batch, via client.renderPdf({ template_id, data }) (TypeScript) / client.render_pdf(template_id=..., data=...) (Python) and the MCP render_pdf tool.
9. Poll Job Status
curl https://tailprint.com/v1/jobs/job_batch_0123456789abcdefπ οΈ Interactive Web Studio & Free Tools
Interactive Template Studio: tailprint.com/studio β Live split-pane editor with Smart Pagination Shield.
Factur-X & PEPPOL Generator: tailprint.com/tools/factur-x β Hybrid PDF/A-3 generator with embedded CII XML.
Factur-X E-Invoice Validator: tailprint.com/tools/factur-x β Drag-and-drop validation tool checking EN 16931 compliance and totals.
Document Template Gallery: tailprint.com/templates β 13 pre-styled Tailwind templates (Invoices, Reports, Receipts, Resumes).
π Local Development & Self-Hosting
Requirements
Node.js 20+
Playwright Chromium (
npx playwright install chromium)Upstash Redis or local Redis (optional, includes in-memory dev fallback)
Installation
# Clone the repository
git clone https://github.com/coheroseb/tailprint.git
cd tailprint
# Install dependencies
npm install
npx playwright install chromium
# Copy environment variables
cp .env.example .env
# Run development server with hot-reload
npm run dev
# Run unit & integration test suite
npm testDocker
docker compose up -d --buildπ License
MIT Β© Tailprint
Available Tools
13 toolscompress_pdfA
Compacts and shrinks PDF file size by bundling internal PDF objects into compressed streams and stripping duplicate structures.
Inputs: pdf (required), output_filename.
fill_pdf_formB
Fills interactive PDF forms (AcroForms) with text, numbers, or checkboxes, with optional form flattening.
Inputs: pdf (required), fields (required), flatten, output_filename.
generate_einvoiceA
Generates a legally compliant European hybrid electronic invoice (Factur-X / ZUGFeRD 2.2 / EN 16931). Renders a beautiful visual PDF and embeds machine-readable CrossIndustryInvoice XML (/EmbeddedFiles) for automated ingestion by ERP and accounting platforms (DATEV, SAP, Chorus Pro, Dinero, Billy).
Inputs: buyer_name (required), line_items (required), seller_name (required), invoice_number (required), +18 more.
get_template_sourceA
Retrieves the full Tailwind CSS HTML source code of a document template by ID, allowing an AI agent to customize data and render it with render_pdf.
Inputs: template_id (required).
list_templatesA
Returns the catalog of available pre-designed Tailwind CSS document templates (Invoices, EU Factur-X, Certificates, Executive Reports, Resumes, Shipping Labels, Event Passes, POS Receipts, Quotes, NDAs, Statements, Presentations, Contracts).
Inputs: no named parameters.
manage_pdf_lifecycleA
Manages the real-time lifecycle of a Time-Limited Isotope PDF document by doc_id or file_id: check expiration status ("status"), immediately revoke/expire the document via remote SCRAM Kill Switch ("expire_now"), or extend its validity window ("extend").
Inputs: action, doc_id, file_id, extend_by, +1 more.
merge_pdfsB
Merges two or more PDF documents (supplied as base64 strings or public URLs) into a single unified vector PDF.
Inputs: pdfs (required), output_filename.
render_pdfB
Converts HTML with full Tailwind CSS classes, a public URL, or a hosted template (template_id + JSON data, e.g. "invoice-modern") into a pixel-perfect, vector PDF document with Smart Pagination Shield. Returns a hosted CDN link and base64 data URI.
Inputs: url, data, html, format, +12 more.
render_presentationA
Converts Markdown slides (separated by "---") into a widescreen 16:9 presentation vector PDF (1920x1080) with slide numbers and modern Tailwind styling. Returns an inline cover preview and hosted PDF link.
Inputs: markdown (required), theme, title, author.
render_templateB
Renders a pre-designed Tailwind CSS document template directly with optional variable data substitution. Ideal for generating invoices, receipts, contracts, and certificates without managing raw HTML markup.
Inputs: template_id (required), password, landscape, variables, +1 more.
split_pdfC
Extracts specific pages or page ranges (e.g. "1-3, 5, 8-10") from an existing PDF document into a new PDF.
Inputs: pdf (required), pages (required), output_filename.
stamp_pdfA
Applies a diagonal semi-transparent watermark or status stamp (e.g. "CONFIDENTIAL", "DRAFT", "PROPRIETARY") across all pages of an existing vector PDF using pdf-lib.
Inputs: pdf_base64 (required), watermark_text (required), color, opacity, +1 more.
verify_pdfA
Verifies the cryptographic HMAC-SHA256 signature and visual content fingerprint of a Tailprint PDF to detect tampering, and extracts its embedded Dual-Brain structured JSON payload in 0ms without OCR.
Inputs: pdf (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 13 tools
Most tools target clearly distinct operations (merge, split, compress, stamp, fill, verify, lifecycle). The main overlap is render_template vs render_pdf, since render_pdf also accepts template_id + JSON data, and generate_einvoice overlaps partially with the invoice template path; descriptions help but an agent could still hesitate over which render entry point to use.
All 13 names are snake_case with a consistent verb_noun structure (list_templates, get_template_source, render_pdf, merge_pdfs, fill_pdf_form, manage_pdf_lifecycle). No camelCase or stylistic mixing, and the render_* family is predictably grouped.
13 tools sits comfortably in the ideal band for a PDF generation/manipulation server. Each tool covers a distinct PDF capability (render, merge, split, compress, stamp, form-fill, verify, lifecycle) with no filler.
The surface covers the core PDF lifecycle well: templating, rendering, e-invoicing, merge/split/compress, forms, watermarking, verification, and expiration management. Minor gaps remainβno encryption/password protection, page rotation, or text extractionβbut agents can work around these via existing render/verify tools.
Maintenance
Related MCP Connectors
Screenshot, PDF and Open Graph image API for AI agents: capture pages, render PDFs, make OG images.
Web pages and PDFs to clean, LLM-ready Markdown with token counts, small crawls and RAG chunks.
Screenshot any URL/HTML as PNG/JPEG/WebP, or read it as clean Markdown/text for LLMs.
Cloud scraping & crawling API for AI agents. Turn any URL into clean, LLM-ready markdown.
Related MCP Servers
- AlicenseAqualityAmaintenanceWeb scraping, crawling, and structured data extraction for AI agents. 5 tools: scrape (clean markdown from any URL), crawl (entire sites), map (discover URLs), extract (structured JSON), and search. 833ms avg latency, single binary, self-hostable.81,255AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceConverts any URL into clean, LLM-ready Markdown, text, or HTML with production-grade features like SSRF protection, rate limiting, retries, caching, and structured error handling.MIT
- AlicenseAqualityCmaintenanceGive AI agents eyes on any web page: pixel-perfect screenshots, print-ready PDFs, branded OG images, code images, and structured page extraction (JSON or Markdown).737 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to render any URL or raw HTML into PDF files or PNG/JPEG/WebP screenshots over MCP stdio or Streamable HTTP. Output stays in memory with SSRF protection, bounded concurrency, and configurable size and timeout limits.237 npm1MIT