Comparison & Deployment Guide
Not sure which packages you need? Use the interactive wizard below, or browse the deployment scenarios and decision matrix to find your ideal setup.
Find Your Perfect Setup
Project Type
Generate Your Setup
Setup Generator
Select your packages and options to generate ready-to-use configuration files.
composer require yeeefang/tcpdf-nextDeployment Scenarios
Different hosting environments have different capabilities. Here's what works best for each:
Shared Hosting
Limited PHP access, no shell. Core-only with basic fonts. No Chrome/RoadRunner.
VPS (PHP-FPM)
Full server control. Install Chrome for HTML→PDF. Good for most apps.
VPS + RoadRunner
RoadRunnerPersistent worker eliminates cold starts. 3-7x throughput boost.
Dedicated Server
Full resources. Ideal for Pro features (PAdES, PDF/A-4, HSM).
Dedicated + RoadRunner
RoadRunnerMaximum throughput. 9,000+ docs/s with 4 workers.
Kubernetes / Docker
RoadRunnerHorizontal scaling. RoadRunner as worker process. Production-grade.
Performance: Standard PHP-FPM vs RoadRunner
RoadRunner keeps your PHP application in memory as a persistent worker, eliminating cold starts and dramatically increasing throughput.
Standard PHP-FPM vs RoadRunner
▲ Higher is betterPHP 8.5.3 + OPcache + JIT · Docker 4 CPUs / 16 GB · i9-13900K · Median of 20 runs
When to use RoadRunner
RoadRunner is recommended when you need high throughput (hundreds of PDFs per minute) or low latency (sub-millisecond response times). For typical web applications generating a few PDFs per request, standard PHP-FPM is perfectly fine.
Use Case Decision Matrix
Which packages should you install for your specific use case?
| Use Case | |||||||
|---|---|---|---|---|---|---|---|
| Invoice & Report Generation | ✅ | ⚪ | ⚪ | ⚪ | ⚪ | ⚪ | — |
| E-commerce (HTML→PDF) | ✅ | ✅ | ⚪ | ⚪ | ⚪ | ⚪ | — |
| Accessible Documents (PDF/UA) | ✅ | — | ✅ | ⚪ | ⚪ | ⚪ | — |
| Digital Signatures (PAdES) | ✅ | — | ✅ | ⚪ | ⚪ | ⚪ | — |
| Legacy TCPDF Migration | ✅ | ⚪ | — | ⚪ | ⚪ | ⚪ | ✅ |
| High-Throughput API | ✅ | ⚪ | ⚪ | ✅ | ✅ | ⚪ | — |
| Archival Compliance (PDF/A-4) | ✅ | — | ✅ | ⚪ | ⚪ | ⚪ | — |
| Barcode-Heavy Documents | ✅ | — | ⚪ | ⚪ | ⚪ | ⚪ | — |
Package Compatibility
Most packages work together seamlessly, with one exception:
| Combination | Compatible | Notes |
|---|---|---|
| Core + Any package | Yes | Core is always required |
| Artisan + Any framework | Yes | Chrome CDP works with all frameworks |
| Pro + Laravel/Symfony/CI | Yes | Full enterprise features in any framework |
| Pro + Adaptation | No | Adaptation wraps the legacy TCPDF API; Pro extends the modern TCPDF-Next API. Choose one approach. |
| Adaptation + Framework | Yes | Use Adaptation to migrate legacy code within your framework |
CJK & Font Considerations
The built-in Basic 14 fonts (Helvetica, Times, Courier, etc.) only support Latin characters. If your documents need Chinese, Japanese, or Korean text, you must:
- Embed TrueType fonts — Use
setFont()with a TTF font that supports your character set - Configure font paths — Set the
TCPDF_FONTS_DIRenvironment variable or use the configuration API - Consider file size — CJK fonts are typically 5-15 MB each; use font subsetting to reduce PDF size
// Example: Using a CJK font
$pdf = Document::createStandalone()
->addPage()
->setFont('/path/to/NotoSansCJK-Regular.ttf', '', 12)
->cell(0, 10, '你好世界 こんにちは 안녕하세요');Recommended CJK Fonts
- Noto Sans CJK — Google's open-source CJK font family (free)
- Source Han Sans — Adobe's equivalent (free)
- Both support Simplified Chinese, Traditional Chinese, Japanese, and Korean in a single font file.
Shared Hosting Limitations
On shared hosting, you typically cannot:
- Install Chrome/Chromium (no Artisan package)
- Run long-lived processes (no RoadRunner)
- Install PHP extensions (limited to what's provided)
Recommended setup for shared hosting:
composer require yeeefang/tcpdf-nextUse Core only with the built-in HTML parser for basic HTML-to-PDF needs. For pixel-perfect HTML rendering, consider upgrading to a VPS.
Next Steps
- Getting Started — Install and create your first PDF
- Installation Guide — Detailed installation for all packages
- Benchmarks — Full performance comparison data
- Migration from TCPDF — Step-by-step migration guide