@gembox/pdfapi
v2026.9.103
Published
JavaScript and TypeScript client for the GemBox.PdfApi engine.
Maintainers
Readme
@gembox/pdfapi
@gembox/pdfapi is the JavaScript and TypeScript client for the GemBox.PdfApi engine — a
self-hosted REST API for converting, securing, extracting and organizing PDF documents. The engine
does the work; this package is a thin, fully typed wrapper over its HTTP API, for Node.js and the
browser alike.
Quickstart
Install the package:
npm install @gembox/pdfapiThe client needs a running engine to talk to. Pull its image and start one using the built-in FREE-LIMITED-KEY:
docker pull gembox/pdfapi
docker run --rm -p 8080:8080 -e GEMBOX_PDFAPI_LICENSE_KEY=FREE-LIMITED-KEY gembox/pdfapiThen merge a couple of PDF documents against it:
import { PdfApiClient } from "@gembox/pdfapi";
const client = new PdfApiClient({ baseUrl: "http://localhost:8080" });
const result = await client.merge(["first.pdf", "second.pdf"]);
await result.save("merged.pdf");This example reads and writes files by path, which only the Node build supports. In a browser,
give merge the files' bytes, a Blob, or a File instead, and read the merged document back
from result.data.
Licensing
The engine needs a license, not this package. Set GEMBOX_PDFAPI_LICENSE_KEY on the engine at
startup, the way the Quickstart shows.
This package is distributed under GemBox's End User License Agreement, included as EULA.txt.
Learn more
Full product documentation: https://www.gemboxsoftware.com/pdf-api
