BROWSER JS · CLIENT-SIDE · WASM

Build a PDF in the browser, no upload.

Merge scans and photos into one multi-page PDF, entirely client-side via WebAssembly. Assembly happens on-device, so the files never touch a server and there's no round-trip to wait on.

100% client-side, zero upload Multi-page PDF in one call Works offline in a PWA
WHAT IT DOES

Images to one multi-page PDF, on-device

  • ✓ Merge JPEG, PNG, and WebP images into a single multi-page PDF
  • ✓ Runs fully in the browser via WebAssembly, with no upload and no server round-trip
  • ✓ Fit each page to A4, Letter, or the source image's native size
  • ✓ Control page order, orientation, and margins per document
  • ✓ Files never leave the device, so nothing touches your infrastructure
  • ✓ Works offline once the module is cached inside a PWA
  • ✓ Stream the finished PDF straight to download, Blob, or IndexedDB
javascript
import { DocumentTools } from "@abscode/browser";

// everything runs on-device via WebAssembly
const tools = await DocumentTools.load();

const pdf = await tools.buildPdf({
  images: [page1, page2, page3],
  pageSize: "A4"
});

saveBlob(pdf, "document.pdf"); // pdf is a Blob
USE CASES

Common scenarios

Privacy-first web apps

Let users bundle sensitive documents into a PDF without a single byte reaching your servers. The whole assembly happens in the tab.

Offline PWAs

Cache the WebAssembly module once and keep building PDFs from captured images even when the device is offline or on a flaky connection.

In-browser document assembly

Combine multiple page images into one file, then hand it to Browser Compression to shrink it before download.

Healthcare portals

Patients photograph ID cards and forms and turn them into a single PDF locally, keeping PHI off the wire and easing compliance scope.

Legal intake

Clients assemble evidence photos and signed pages into one court-ready PDF on their own machine before submitting the matter.

No-upload workflows

Skip the upload step entirely. Build the PDF client-side, or first run Browser Conversion to normalise mixed image formats.

PRICING

Priced for every team

Included in the SDK license. Pricing shown in your local currency.

Affordable to all

Because assembly runs in the browser, there is no per-page server cost to pass along. The same flat rate works whether you build one PDF a day or millions.

See pricing →

FAQ

Common questions

Can I build a PDF in the browser without uploading the source images?
Yes. The library assembles images into a multi-page PDF entirely client-side using WebAssembly, so there is no upload and no server round-trip. The source files never leave the user's device, which keeps them off your infrastructure and out of scope for data-in-transit concerns.
Which image formats can I merge into a single PDF?
You can combine JPEG, PNG, and TIFF images, including multi-page TIFF, as well as existing PDF pages into one output document. Mixed inputs are normalised during assembly, so a batch of different formats still produces one consistent multi-page PDF.
Does building a PDF work offline?
Yes. Once the WebAssembly module is cached by a service worker inside a PWA, PDF assembly runs with no network connection at all. Because nothing is uploaded, the same code path works identically online, offline, or on an unreliable connection.
What page sizes and layout options can I control?
You can set the output to standard ISO A-series page sizes from A0 to A6, with A4 used as the default. Each source image can be stretched to fill the page or scaled to preserve its aspect ratio, and you can set the output DPI to match your resolution target.
How does the library report errors, and can a corrupt file crash the app?
No. Every method resolves a result object of the form {STATUS, DESCRIPTION, DATA} instead of throwing, so a corrupt or unsupported file returns a status you can check rather than an exception that breaks the tab. This makes error handling predictable across the whole API.
Will assembling a large, multi-page PDF freeze the browser tab?
It does not have to. The library ships in two builds with an identical API: a main-thread version and a worker-pool version that runs assembly off the UI thread. Using the worker-pool build keeps the interface responsive while large or multi-page jobs are processed.
Can I inspect an image before adding it to the PDF?
Yes. An inspection call returns the page count and, for each page, the width, height, colour type, and DPI, and a separate call returns just the page count of a multi-page file. This lets you validate or preview inputs before building the final document.
Is there a license, and what does the free demo produce?
The library is included in the SDK license, and the unlicensed demo is fully functional so you can integrate and test the real API. Demo output carries a visible watermark band, which a license removes. See the pricing page for licensing details.
THE FULL TOOLKIT

Explore the rest of the Browser JS Library

One license, every capability — take this and you also get all of these.

Build PDFs in the browser with the free trial

Free signup credit. No card required.