The PHP SDK provides a client for integrating PDFGate API endpoints into your PHP applications. It is designed for frameworks like Laravel, Symfony, and custom backend workflows that require reliable, direct access to all API operations.
Source code: github.com/pdfgate/pdfgate-sdk-php
Package: packagist.org/packages/pdfgate/pdfgate-sdk-php
Install the package with Composer, then initialize the client with your API key.
The example below generates a PDF from a URL and returns a pre-signed file URL.
You can also generate a PDF directly from raw HTML and attach metadata to the resulting document.
Use getFile to retrieve the output stream and save it locally.
| Method | Purpose |
|---|---|
generatePdf | Generate a PDF from HTML or a public URL. |
uploadFile | Upload a PDF file for later transformations. |
getFile | Download the PDF stream for a stored document. |
getDocument | Retrieve document metadata and file URLs. |
flattenPdf | Flatten interactive PDF fields into a static document. |
compressPdf | Compress a PDF and return the resulting document record. |
protectPdf | Encrypt a PDF and apply access restrictions. |
watermarkPdf | Apply text or image watermarks to a document. |
extractPdfFormData | Read form field values from a fillable PDF. |
Use the SDK together with the main API documentation for request parameters, endpoint behavior, and workflow guides such as webhooks and PDF form fields.