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-qrattributes - 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
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.
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 }
}
}Get Started
Quick Start
Get up and running in under 5 minutes
API Reference
Complete API documentation
Page Breaks
Control page breaks and table splitting
QR Codes
Auto-generate QR codes in your PDFs
Watermarks
Add text watermarks for branding & security
PDF Hosting
Store and serve your PDFs
Billing & Plans
Understand plans and usage limits
Base URL
All API requests should be made to:
https://api.syntaxdoc.comAuthentication
All PDF generation endpoints require an API key. Include it in the X-API-Key header:
X-API-Key: sk_live_your_api_keyNever expose your API key in client-side code. Always make API calls from your server.
Plans & Pricing
| Plan | Price | Conversions/month | Hosted PDFs | Retention |
|---|---|---|---|---|
| Hobby | Free | 100 | 10 | 1 day |
| Pro | $29/mo | 10,000 | 500 | 7 days |
| Enterprise | $99/mo | Unlimited | 10,000 | 30 days |