Skip to content

Cookbook

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

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.

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