Skip to content

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

1
Project Type
2
PHP Version
3
Framework
4
HTML-to-PDF
5
Pro Features

Project Type

Generate Your Setup

Setup Generator

Select your packages and options to generate ready-to-use configuration files.

Core is always included

Base Image
composer require yeeefang/tcpdf-next

Deployment Scenarios

Different hosting environments have different capabilities. Here's what works best for each:

🏠

Shared Hosting

Performance
Recommended Packages
Core Core

Limited PHP access, no shell. Core-only with basic fonts. No Chrome/RoadRunner.

🖥

VPS (PHP-FPM)

Performance
Recommended Packages
Core CoreArtisan ArtisanLaravel Laravel

Full server control. Install Chrome for HTML→PDF. Good for most apps.

🖥

VPS + RoadRunner

RoadRunner
Performance
Recommended Packages
Core CoreArtisan ArtisanLaravel Laravel

Persistent worker eliminates cold starts. 3-7x throughput boost.

Dedicated Server

Performance
Recommended Packages
Core CoreArtisan ArtisanPro ProLaravel Laravel

Full resources. Ideal for Pro features (PAdES, PDF/A-4, HSM).

Dedicated + RoadRunner

RoadRunner
Performance
Recommended Packages
Core CoreArtisan ArtisanPro ProLaravel Laravel

Maximum throughput. 9,000+ docs/s with 4 workers.

Kubernetes / Docker

RoadRunner
Performance
Recommended Packages
Core CoreArtisan ArtisanPro ProSymfony Symfony

Horizontal 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 better
PHP-FPM RoadRunner
Simple Document
390 docs/s
2,605 docs/s
6.7x faster
Invoice
294 docs/s
1,960 docs/s
6.7x faster
100-Page Report
14 docs/s
98 docs/s
7.0x faster
4 Workers
1,500 docs/s
9,221 docs/s
6.1x faster

PHP 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?

\u{2705} Recommended\u{26AA} Optional N/A
Use CaseCore CoreArtisan ArtisanPro ProLaravel LaravelSymfony SymfonyCI4 CI4Adaptation Adaptation
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:

CombinationCompatibleNotes
Core + Any packageYesCore is always required
Artisan + Any frameworkYesChrome CDP works with all frameworks
Pro + Laravel/Symfony/CIYesFull enterprise features in any framework
Pro + AdaptationNoAdaptation wraps the legacy TCPDF API; Pro extends the modern TCPDF-Next API. Choose one approach.
Adaptation + FrameworkYesUse 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:

  1. Embed TrueType fonts — Use setFont() with a TTF font that supports your character set
  2. Configure font paths — Set the TCPDF_FONTS_DIR environment variable or use the configuration API
  3. Consider file size — CJK fonts are typically 5-15 MB each; use font subsetting to reduce PDF size
php
// 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:

bash
composer require yeeefang/tcpdf-next

Use 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

Released under the LGPL-3.0-or-later License.