PDFGate's PHP SDK

PdfGateClient
in package

PDFGate API client.

Tags
phpstan-import-type

GeneratePdfRequestPayload from \PdfGate\Type\Types

phpstan-import-type

UploadFileRequestPayload from \PdfGate\Type\Types

phpstan-import-type

FlattenPdfRequestPayload from \PdfGate\Type\Types

phpstan-import-type

CompressPdfRequestPayload from \PdfGate\Type\Types

phpstan-import-type

ProtectPdfRequestPayload from \PdfGate\Type\Types

phpstan-import-type

WatermarkPdfRequestPayload from \PdfGate\Type\Types

phpstan-import-type

ExtractPdfFormDataRequestPayload from \PdfGate\Type\Types

phpstan-import-type

GetDocumentQueryPayload from \PdfGate\Type\Types

phpstan-import-type

CreateEnvelopeRequestPayload from \PdfGate\Type\Types

Table of Contents

Constants

PROD_BASE_URL  = 'https://api.pdfgate.com'
SANDBOX_BASE_URL  = 'https://api-sandbox.pdfgate.com'

Properties

$requestHandler  : ApiRequestHandler

Methods

__construct()  : mixed
compressPdf()  : PdfGateDocumentMetadata
Compresses an existing PDF document.
createEnvelope()  : PdfGateEnvelope
Creates a signing envelope from existing source documents.
extractPdfFormData()  : array<string, mixed>
Extracts PDF form fields and values for an existing document.
flattenPdf()  : PdfGateDocumentMetadata
Flattens an existing PDF document.
generatePdf()  : PdfGateDocumentMetadata
Generates a PDF from HTML or URL.
getDocument()  : PdfGateDocumentMetadata
Retrieves metadata and file details for an existing document.
getEnvelope()  : PdfGateEnvelope
Retrieves the current state of an existing envelope.
getFile()  : resource
Retrieves a generated PDF file as a readable stream resource.
protectPdf()  : PdfGateDocumentMetadata
Protects an existing PDF document with encryption and permission restrictions.
sendEnvelope()  : PdfGateEnvelope
Sends an existing envelope to all configured recipients.
uploadFile()  : PdfGateDocumentMetadata
Uploads a raw PDF file or URL source.
watermarkPdf()  : PdfGateDocumentMetadata
Adds a text or image watermark to an existing PDF document.
buildEnvelopeResponse()  : PdfGateEnvelope
createRequestHandler()  : ApiRequestHandler
resolveBaseUrl()  : string

Constants

PROD_BASE_URL

private mixed PROD_BASE_URL = 'https://api.pdfgate.com'

SANDBOX_BASE_URL

private mixed SANDBOX_BASE_URL = 'https://api-sandbox.pdfgate.com'

Properties

Methods

__construct()

public __construct(string $apiKey) : mixed
Parameters
$apiKey : string

PDFGate API key.

createEnvelope()

Creates a signing envelope from existing source documents.

public createEnvelope(CreateEnvelopeRequestPayload $request) : PdfGateEnvelope
Parameters
$request : CreateEnvelopeRequestPayload

Create envelope request payload.

Return values
PdfGateEnvelope

extractPdfFormData()

Extracts PDF form fields and values for an existing document.

public extractPdfFormData(ExtractPdfFormDataRequestPayload $request) : array<string, mixed>
Parameters
$request : ExtractPdfFormDataRequestPayload

Extract PDF form data request payload.

Return values
array<string, mixed>

getDocument()

Retrieves metadata and file details for an existing document.

public getDocument(string $documentId[, GetDocumentQueryPayload $query = array() ]) : PdfGateDocumentMetadata
Parameters
$documentId : string

Existing document ID.

$query : GetDocumentQueryPayload = array()

Optional get-document query options.

Return values
PdfGateDocumentMetadata

getFile()

Retrieves a generated PDF file as a readable stream resource.

public getFile(string $documentId) : resource
Parameters
$documentId : string

Generated document identifier.

Return values
resource

sendEnvelope()

Sends an existing envelope to all configured recipients.

public sendEnvelope(string $envelopeId) : PdfGateEnvelope
Parameters
$envelopeId : string

Existing envelope ID.

Return values
PdfGateEnvelope

resolveBaseUrl()

private resolveBaseUrl(string $apiKey) : string
Parameters
$apiKey : string
Return values
string

        
On this page

Search results