The Python SDK provides a client for integrating PDFGate API endpoints into your Python applications. It is designed for automation scripts, backend services, data pipelines, and other workflows that require reliable, direct access to all API operations.
Source code: github.com/pdfgate/pdfgate-sdk-python
Package: pypi.org/project/pdfgate
Install the package with pip, then initialize the client with your API key.
The example below generates a PDF from a URL and prints the resulting document id.
The SDK exposes both sync and async variants. Async methods use the same interface and add an _async suffix.
Use get_file to retrieve the file bytes and save them locally.
| Method | Purpose |
|---|---|
generate_pdf | Generate a PDF from HTML or a public URL. |
get_document | Retrieve document metadata and file information. |
get_file | Download the raw PDF bytes for a stored document. |
upload_file | Upload a PDF file for later transformations. |
flatten_pdf | Flatten form fields into a non-editable PDF. |
compress_pdf | Compress a PDF and return the resulting document record. |
watermark_pdf | Apply image or text watermarks to a document. |
protect_pdf | Encrypt a PDF and apply access restrictions. |
extract_pdf_form_data | Read 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.