The Node.js SDK is the fastest way to start generating and processing PDFs from your Javascript services.
Source code: github.com/pdfgate/pdfgate-sdk-node
Package: npmjs.com/package/pdfgate
Install the official package from npm, then initialize the client with your API key. The SDK supports modern Node.js environments and works well in backend applications and automation flows.
The example below generates a PDF from a URL and writes the binary response to a local file.
The SDK wraps the same core operations available through the REST API. You can start with the SDK for convenience and still use the broader API reference for endpoint-level details.
| Method | Purpose |
|---|---|
generatePdf | Generate a PDF from a URL or HTML input. |
getDocument | Retrieve document metadata and file information. |
getFile | Download the binary PDF file for a document. |
upload | Upload a file. |
flattenPdf | Flatten interactive PDF form fields. |
compressPdf | Reduce PDF size and optionally return JSON metadata. |
watermarkPdf | Apply text or image watermarks to a PDF. |
protectPdf | Encrypt a PDF and restrict editing, copying, or printing. |
extractPdfFormData | Read submitted values from fillable PDF forms. |
Use the SDK together with the main API documentation for request options, endpoint behavior, and guides such as webhooks and PDF form fields.