Java SDK

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

Installation

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.

Gradle
Maven

Quick start

The example below generates a PDF from HTML, retrieves the stored file bytes, and writes the output to disk.

Sync and async usage

The SDK exposes synchronous methods, Async variants based on CompletableFuture, and callback-style methods with a Call suffix.

Core methods

MethodPurpose
generatePdfGenerate a PDF from HTML or a URL.
getDocumentRetrieve document metadata and processing details.
getFileDownload the stored PDF bytes for a document id.
uploadFileUpload a PDF from bytes or by public URL.
flattenPdfFlatten form fields into a non-editable document.
compressPdfCompress a PDF and return the resulting document record.
watermarkPdfApply an image or text watermark to a PDF.
protectPdfEncrypt a PDF and apply access restrictions.
extractPdfFormDataRead submitted values from fillable PDF forms.

Related documentation

Use the SDK together with the main API documentation for endpoint behavior, request parameters, and workflow guides such as webhooks and PDF form fields.