Skip to content

Cloudflare · Integration

Cloudflare integration

Use nextpdf/cloudflare to render Portable Document Format (PDF) files at the edge, store generated PDFs in R2, or validate application programming interface (API) requests at the package level before they reach a worker endpoint.

PageUse it for
OverviewPackage boundaries and supported workflows.
InstallComposer installation and Cloudflare prerequisites.
QuickstartYour first edge-rendered PDF workflow.
ConfigurationWorker, API protection, and R2 configuration keys.
APIRenderer, payload, response parser, API protection, R2 archive, and pinned transport APIs.
Developer guideEdge lifecycle, request boundaries, local fallback, and extension points.
Production usageDeployment and operations patterns.
Security and operationsWorker Uniform Resource Locator (URL) validation, size limits, pins, and R2 controls.
TroubleshootingCommon edge rendering and archive failures.
SymbolRole
NextPDF\Cloudflare\CloudflareHtmlRendererSends Hypertext Markup Language (HTML) rendering requests to a Cloudflare worker.
NextPDF\Cloudflare\CloudflareRendererConfigImmutable worker renderer configuration object.
NextPDF\Cloudflare\ApiProtectionRequest-size, client, and API-key gate.
NextPDF\Cloudflare\R2ArchiveManagerUploads generated PDF bytes and creates signed URLs.
NextPDF\Cloudflare\Transport\PinnedCurlTransportPHP Standard Recommendation (PSR)-18 transport with public-key pinning support.