The Java SDK provides a client for integrating PDFGate API endpoints into your applications. It is designed for backend services, scheduled jobs, and enterprise environments that require reliable, direct access to all API operations.
Source code: github.com/pdfgate/pdfgate-sdk-java
Package: central.sonatype.com/artifact/com.pdfgate/pdfgate
The SDK is published to Maven Central under com.pdfgate:pdfgate. Add the dependency to Gradle or Maven, then initialize the client with your API key.
The example below generates a PDF from HTML, retrieves the stored file bytes, and writes the output to disk.
The SDK exposes synchronous methods, Async variants based on CompletableFuture, and callback-style methods with a Call suffix.
| Method | Purpose |
|---|---|
generatePdf | Generate a PDF from HTML or a URL. |
getDocument | Retrieve document metadata and processing details. |
getFile | Download the stored PDF bytes for a document id. |
uploadFile | Upload a PDF from bytes or by public URL. |
flattenPdf | Flatten form fields into a non-editable document. |
compressPdf | Compress a PDF and return the resulting document record. |
watermarkPdf | Apply an image or text watermark to a PDF. |
protectPdf | Encrypt a PDF and apply access restrictions. |
extractPdfFormData | Read submitted values from fillable PDF forms. |
Use the SDK together with the main API documentation for endpoint behavior, request parameters, and workflow guides such as webhooks and PDF form fields.