SyntaxdocSyntaxdoc

Introduction

The most reliable HTML to PDF conversion API. Convert complex HTML layouts to pixel-perfect PDFs with a single API call.

The most reliable HTML to PDF conversion API. Handle complex layouts, custom fonts, and dynamic content with pixel-perfect accuracy.

SyntaxDoc is currently in beta. Get started with 100 free conversions per month on the Hobby plan.

Why SyntaxDoc?

Unlike other PDF generation services, SyntaxDoc is built specifically for complex HTML layouts. Whether you're generating invoices, reports, certificates, or documentation, we handle:

  • Tables & Grids - Perfect rendering of complex table structures
  • Custom Fonts - Use any web font with automatic caching
  • Images & SVGs - Full support for embedded assets with intelligent caching
  • Multi-page Documents - Automatic page breaks with headers/footers
  • CSS Support - Modern CSS including Flexbox and Grid
  • Smart Page Breaks - Automatic table splitting and intelligent content flow
  • QR Code Generation - Auto-generate QR codes inline with data-qr attributes
  • Text Watermarks - Add customizable text watermarks to every page
  • Batch Processing - Generate hundreds of PDFs in a single request
  • PDF Merging - Combine multiple PDFs into one document
  • PDF Hosting - Store and serve your PDFs with direct URLs

Quick Example

Generate a PDF
const formData = new FormData();
formData.append('files', new Blob(['<h1>Hello World</h1>'], { type: 'text/html' }), 'index.html');
formData.append('options', JSON.stringify({
  fileName: 'hello',
  format: 'A4',
  margin: { top: '1cm', bottom: '1cm', left: '1cm', right: '1cm' }
}));

const response = await fetch('https://api.syntaxdoc.com/pdf/generate', {
  method: 'POST',
  headers: {
    'X-API-Key': 'sk_live_your_api_key',
  },
  body: formData
});

const pdf = await response.blob();

Advanced Features

Automatic QR Code Generation

Embed QR codes directly in your HTML - no separate API calls needed:

<img data-qr="https://syntaxdoc.com/verify/cert-12345" 
     data-qr-size="200" 
     alt="Verification QR Code" />

The QR code is automatically generated and embedded during PDF creation. Perfect for certificates, tickets, invoices, and product labels.

Learn more about QR codes →

Text Watermarks

Add watermarks for branding, security, or document status:

{
  watermark: {
    text: 'CONFIDENTIAL',
    fontSize: 60,
    opacity: 0.2,
    rotation: -45,
    color: { r: 1, g: 0, b: 0 }
  }
}

Learn more about watermarks →

Get Started

Base URL

All API requests should be made to:

https://api.syntaxdoc.com

Authentication

All PDF generation endpoints require an API key. Include it in the X-API-Key header:

X-API-Key: sk_live_your_api_key

Never expose your API key in client-side code. Always make API calls from your server.

Plans & Pricing

PlanPriceConversions/monthHosted PDFsRetention
HobbyFree100101 day
Pro$29/mo10,0005007 days
Enterprise$99/moUnlimited10,00030 days

On this page