A PHP client library for interacting with the Gotenberg API to convert documents and web pages to PDF.
Gotenberg PHP is a PHP client library for the Gotenberg API, which is a containerized service for converting various document formats into PDFs. It provides a fluent interface to interact with Gotenberg's modules like Chromium and LibreOffice, enabling PHP applications to generate PDFs from HTML, URLs, and Office documents programmatically.
PHP developers building applications that require PDF generation or document conversion, such as reporting tools, document processing pipelines, or web-to-PDF services.
It offers a standardized, PSR-compliant way to integrate with Gotenberg's powerful conversion API, reducing boilerplate code and providing built-in error handling and file management helpers.
🐘 A PHP client for interacting with Gotenberg.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The library offers a fluent interface that mirrors Gotenberg's endpoints, making it intuitive to build requests for HTML, Office, and PDF conversions, as shown in the quick examples with Chromium and LibreOffice modules.
Built on PSR-7 and PSR-18 interfaces, it ensures interoperability with various HTTP clients and frameworks, reducing integration effort and promoting code reusability in PHP ecosystems.
Throws exceptions with correlation IDs for debugging API errors, aiding in tracing issues in production environments, as highlighted in the error handling section with GotenbergApiErrored.
Supports creating form files from paths, strings, or custom streams via the Stream class, allowing versatile document input sources without needing physical files upfront.
Requires a running Gotenberg instance, adding infrastructure management overhead, potential single points of failure, and additional setup costs compared to self-contained libraries.
Needs installation of both the PHP library and Gotenberg API, plus optional HTTP client adapters, which can be non-trivial for teams unfamiliar with containerized services or PSR standards.
Tied to Gotenberg's features; for instance, advanced PDF editing like complex form filling or digital signatures may not be supported, as the README focuses on basic conversion and manipulation endpoints.