Skip to content

Install NextPDF

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.

NextPDF targets one modern runtime. These constraints come directly from the packages’ own composer.json files.

RequirementConstraintNotes
PHP>=8.4 <9.0Composer refuses to install on PHP 8.3 or below, or on PHP 9.
Composer2.7 or newerRequired for dependency resolution and autoloader generation.
ext-mbstringRequiredMulti-byte string handling for text layout.
ext-zlibRequiredStream compression for Portable Document Format (PDF) objects.
Chrome or ChromiumOptionalOnly for the Artisan renderer (writeHtmlChrome()).
Gotenberg serviceOptionalOnly for office and HTML conversion through Gotenberg.
Python3.10 or newerOnly 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.

To generate and inspect PDF files from PHP, you need only the core engine.

Terminal window
composer require nextpdf/core

Commit composer.lock so every deployed worker resolves the same engine version. After installation, continue to Your first PDF.

Install one framework adapter to get container bindings, response helpers, and queue jobs. Each adapter declares nextpdf/core and resolves it for you.

Terminal window
composer require nextpdf/laravel

Auto-discovery registers the service provider and the Pdf facade. Then publish the configuration file:

Terminal window
php artisan vendor:publish --tag=nextpdf-config

See the Laravel install guide and the Laravel quickstart.

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.

Terminal window
composer require nextpdf/artisan

This 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.

NextPDF Server (also called Connect) is a standalone service. It exposes the engine over Model Context Protocol (MCP), Representational State Transfer (REST), and gRPC.

Terminal window
composer require nextpdf/server

The 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:

Terminal window
./vendor/bin/rr get-binary

See the Connect install guide and the Connect quickstart.

The Python SDK is the typed client for a running NextPDF Server. Install it from the Python Package Index (PyPI):

Terminal window
pip install nextpdf

The SDK needs Python 3.10 or newer and a reachable NextPDF Server endpoint. See the Python SDK quickstart.

Confirm each distribution installed correctly before you start writing code.

Terminal window
composer show nextpdf/core

A version line confirms that the engine is installed and available to the autoloader.