Cookbook
At a glance
Section titled “At a glance”The cookbook is task-oriented. Each recipe solves one problem with a copyable, source-backed sample. Recipes are grouped into three families by where the work runs. Choose the family that matches how you call NextPDF, then open the recipe you need.
When you want to understand why the engine behaves a certain way, read the Guides instead. For the verified application programming interface (API), read the Reference.
PHP recipes
Section titled “PHP recipes”PHP recipes run the core engine directly, in process. Each recipe starts with composer require nextpdf/core, then uses the public API to build, sign, inspect, or convert documents, including Document::createStandalone() and writeHtml().
Connect recipes
Section titled “Connect recipes”Connect recipes call NextPDF through the server tool registry over the Model Context Protocol (MCP), Representational State Transfer (REST), or gRPC. The same tool call works across all three transports and stays behind the human-in-the-loop confirmation gate.
Integration recipes
Section titled “Integration recipes”Integration recipes show how to wire NextPDF into an application framework or delegate rendering to an external backend. They cover framework adapters, renderer bridges, and the migration path from a legacy library.
Recipe conventions
Section titled “Recipe conventions”Every recipe follows a documented contract: source-backed samples, reproducibility-profile front-matter, an honest conformance boundary, and the publish gate. Read the conventions page for your recipe family before you adapt a sample.
See also
Section titled “See also”- Guides — conceptual and how-to documentation.
- Reference — the verified API and the Cascading Style Sheets (CSS) support matrix.
- Choose an integration — a decision matrix that maps use cases to integrations.