Install NextPDF
At a glance
Section titled “At a glance”Install any NextPDF distribution with one package manager command. PHP distributions use Composer; the Python software development kit (SDK) uses pip. Choose the tab for what you are building. Run the command, then verify the result at the bottom of this page.
Requirements
Section titled “Requirements”NextPDF targets one modern runtime. These constraints come directly from
the packages’ own composer.json files.
| Requirement | Constraint | Notes |
|---|---|---|
| PHP | >=8.4 <9.0 | Composer refuses to install on PHP 8.3 or below, or on PHP 9. |
| Composer | 2.7 or newer | Required for dependency resolution and autoloader generation. |
ext-mbstring | Required | Multi-byte string handling for text layout. |
ext-zlib | Required | Stream compression for Portable Document Format (PDF) objects. |
| Chrome or Chromium | Optional | Only for the Artisan renderer (writeHtmlChrome()). |
| Gotenberg service | Optional | Only for office and HTML conversion through Gotenberg. |
| Python | 3.10 or newer | Only for the Python SDK. |
ext-mbstring and ext-zlib ship enabled in every supported PHP build.
Integrations check for them during boot and stop with a clear message if
either one is missing.
Install core
Section titled “Install core”To generate and inspect PDF files from PHP, you need only the core engine.
composer require nextpdf/coreCommit composer.lock so every deployed worker resolves the same engine
version. After installation, continue to Your first PDF.
Install a framework integration
Section titled “Install a framework integration”Install one framework adapter to get container bindings, response helpers,
and queue jobs. Each adapter declares nextpdf/core and resolves it for
you.
composer require nextpdf/laravelAuto-discovery registers the service provider and the Pdf facade. Then
publish the configuration file:
php artisan vendor:publish --tag=nextpdf-configSee the Laravel install guide and the Laravel quickstart.
composer require nextpdf/symfonyIn a Symfony Flex application, the bundle registers itself. In a non-Flex
application, add NextPDF\Symfony\NextPdfBundle to config/bundles.php
yourself. See the Symfony install guide.
composer require nextpdf/codeigniterCodeIgniter 4 discovers the Services class and the pdf() helper
automatically, so you do not need manual registration. See the
CodeIgniter install guide.
Install a renderer or service
Section titled “Install a renderer or service”NextPDF renders HTML to PDF in three ways. Install the option for where
you want rendering to happen. None of these replaces writeHtml(),
the built-in pure-PHP HTML pipeline in the core engine.
composer require nextpdf/artisanThis package adds headless-Chrome rendering through the Chrome DevTools Protocol (CDP).
You also need a Chrome or Chromium binary that the host can reach. After
installation, call writeHtmlChrome() on a document. See the
Artisan quickstart.
composer require nextpdf/cloudflare guzzlehttp/guzzleRendering runs through Cloudflare Browser Rendering at the edge. The bridge depends only on PHP Standards Recommendation (PSR) contracts PSR-18 and PSR-17, so you supply your own Hypertext Transfer Protocol (HTTP) client (Guzzle shown here). See the Cloudflare install guide.
composer require nextpdf/gotenberg guzzlehttp/guzzleThis package converts office documents and HTML through a Gotenberg service. You provide a PSR-18 client and a reachable Gotenberg instance. See the Gotenberg install guide.
Install the server
Section titled “Install the server”NextPDF Server (also called Connect) is a standalone service. It exposes the engine over Model Context Protocol (MCP), Representational State Transfer (REST), and gRPC.
composer require nextpdf/serverThe package adds console entry points to vendor/bin/, including
vendor/bin/nextpdf-mcp (the MCP stdio server) and
vendor/bin/nextpdf-server (the REST server). The REST and gRPC
transports also need the RoadRunner binary:
./vendor/bin/rr get-binarySee the Connect install guide and the Connect quickstart.
Install the Python SDK
Section titled “Install the Python SDK”The Python SDK is the typed client for a running NextPDF Server. Install it from the Python Package Index (PyPI):
pip install nextpdfThe SDK needs Python 3.10 or newer and a reachable NextPDF Server endpoint. See the Python SDK quickstart.
Verify the install
Section titled “Verify the install”Confirm each distribution installed correctly before you start writing code.
composer show nextpdf/coreA version line confirms that the engine is installed and available to the autoloader.
php artisan package:discover --ansiThe output lists nextpdf/laravel among the discovered packages.
php bin/console debug:container nextpdfThe container reports the nextpdf.document alias and the PdfFactory
service.
./vendor/bin/generate-skills --dry-run --list-toolsThis boots the registry and prints the tools this installation exposes without starting a server.
nextpdf versionA version string confirms the SDK imports cleanly.