Download the PHP package pdfgate/pdfgate-sdk-php without Composer
On this page you can find all versions of the php package pdfgate/pdfgate-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package pdfgate-sdk-php
PDFGate SDK for PHP
Official PHP SDK for the PDFGate HTTP API.
PDFGate lets you generate, process, and secure PDFs via a simple API:
- HTML or URL to PDF
- Fillable forms and adding form fields
- Create signing envelopes from source documents
- Embedded signing inside your own application
- Store and reuse recipients across envelopes
- Automatic signing with a recipient's stored signature
- Flatten (all or specific fields), compress, watermark, protect PDFs
- Extract PDF form data
- Delete stored documents
- Manage and verify webhooks
🚀 SDK Documentation: https://pdfgate.github.io/pdfgate-sdk-php
🧭 API Reference: https://pdfgate.github.io/pdfgate-sdk-php/api/
📘 API Documentation: https://pdfgate.com/documentation
🔑 Dashboard & API keys: https://dashboard.pdfgate.com
Requirements
- PHP
7.4+ ext-curlext-json
Installation
Quick Start
Usage Examples
Generate PDF
Upload PDF
Create Envelope
Each recipient is given either as email and name or as the recipientId of a stored recipient (see Automatic Signing). Optional sendSignedCopy controls whether the recipient is emailed the signed document when the document completes; it defaults to true for recipients who sign through the emailed signing link and false for embedded and automatic signing recipients.
Send Envelope
Get Envelope
Void Envelope
Cancel an envelope in created or in_progress status. Recipients who have not signed are notified by email and their signing links stop working; documents already signed by all recipients are not affected. The optional reason is visible to recipients.
Delete Envelope
Permanently delete an envelope and the files it produced (signed documents and audit logs). Recipient data is anonymized and recipients lose access; source documents are not deleted. Only envelopes in draft, completed, expired, or voided status can be deleted — void an active envelope first.
Embedded Signing
Embedded recipients sign inside your own application through an embed link and receive no emails from PDFGate. Create the envelope with an embedded recipient, send it, then create an embed link and render the returned URL in an iframe.
The envelope must be in in_progress status and the link expires after 10 minutes, so create it when the signer is ready — one link per signing session.
When the session ends the iframe redirects to returnUrl with event (signing_complete, voided, expired or not_found), envelopeId, documentId and recipientId appended as query parameters; existing returnUrl query parameters are preserved.
Manage Recipients
Store recipients once and reference them from envelopes by recipientId. Emails are not unique — every createRecipient() call creates a new recipient — so list existing recipients first when reuse is intended.
Automatic Signing
A recipient can store a reusable signature once, and later envelopes apply it on their behalf with no signing session. Request the enrolment, and PDFGate emails the recipient a link where they verify their email with a one-time code, accept the authorization text and type, draw or upload their signature. The link is valid for 7 days; calling requestRecipientSignature() again replaces a pending request.
autoSign requires recipientId pointing to a recipient with an active stored signature and cannot be combined with embedded. Every required field of the recipient must already have a value before the document is sent, except signature and auto-filled date fields. If the stored signature is removed before the turn comes, a signing link is emailed instead. The audit log records every automatic signature with the enrolment details.
The RecipientStoredSignature object returned by getSignature() carries getStatus() (pending, active or revoked, see StoredSignatureStatus), getRequestedAt(), getAdoptionMethod() (see SignatureAdoptionMethod), getEnrolledAt(), getRevokedAt(), getLastUsedAt() and getUseCount(). getImage() is set by getRecipient() only while the signature is active. Removing an active signature fires the recipient.signature.revoked webhook event, and envelopes already waiting on it fall back to a signing link emailed to the recipient.
Download File
Add Form Fields
Flatten Specific Fields
Delete a Document
Manage Webhooks
For complete operation examples (flattenPdf, addFormFields, compressPdf, protectPdf, watermarkPdf, extractPdfFormData, getDocument, deleteDocument, createEnvelope, sendEnvelope, getEnvelope, createEmbedLink, createRecipient, listRecipients, getRecipient, updateRecipient, deleteRecipient, requestRecipientSignature, removeRecipientSignature, createWebhook, getWebhook, deleteWebhook), see API.
To download generated files, enable Save files for one month in PDFGate Dashboard settings.
Error Handling
Non-2xx responses throw PdfGate\Exception\ApiException with:
getStatusCode()getResponseBody()(truncated)
Transport and parsing failures throw PdfGate\Exception\TransportException and preserve original causes.
Webhook verification failures throw PdfGate\Exception\SignatureVerificationException.
See Error handling guide for patterns and retry guidance.
Webhook Verification
Use WebhookSignatureVerifier to verify the x-pdfgate-signature header against the raw request body and your webhook secret.
Development
This section is the source of truth for setup and test commands.
Local setup
Run tests
Unit tests:
Acceptance tests (real API calls):
Static analysis
Build documentation
Generate API docs (requires phpDocumentor in PATH, or PHPDOC_BIN):
Render the curated guides into the published site layout:
Validate markdown links:
Run both:
The combined docs site is generated into build/docs/site, with curated guides at the site root and API reference under build/docs/site/api. GitHub Pages publishes that combined artifact.
Generate the changelog manually
If you want to update CHANGELOG.md before or after making a release, run the generator
manually. It reads commit subjects since the previous semver tag and updates CHANGELOG.md
for the release version you provide.
Generate changelog content for a release version:
Preview the update without writing CHANGELOG.md:
If there are no updates since the previous release, the script generates a fallback Changed note instead of failing.
All versions of pdfgate-sdk-php with dependencies
ext-curl Version *
ext-json Version *