BROWSER JS · CLIENT-SIDE · WASM

Convert PNG to PDF in the browser.

Combine one or many PNG images into a single PDF, all client-side. The pipeline runs in WebAssembly, so there is no upload and no server round-trip. The images never leave the device.

Runs fully in-browser (WASM) No upload, no server round-trip One PDF from many PNGs
WHAT IT DOES

One PDF from many PNGs, all client-side

  • ✓ Merge multiple PNGs into one multi-page PDF
  • ✓ Runs entirely in the browser via WebAssembly
  • ✓ No upload. Images stay on the user's device
  • ✓ Set page size, margins, and orientation per image
  • ✓ Fit each image to the page or keep pixels 1:1
  • ✓ Preserve full resolution or downscale to shrink output
  • ✓ Works offline once the page has loaded
javascript
// Runs in the browser, nothing is uploaded
import { DocumentTools } from "@abscode/browser";

const tools = await DocumentTools.load();
const files = document.querySelector("#images").files;

const pdf = await tools.pngToPdf(files, {
  pageSize: "A4",
  fit: "contain"
});
saveBlob(pdf, "images.pdf"); // pdf is a Blob
USE CASES

Common scenarios

Screenshot to PDF

Let users drop a batch of screenshots and download one tidy PDF. No account, no upload, no waiting on a server.

Diagram & chart export

Export rendered diagrams or chart canvases as PNGs, then bundle them into one shareable PDF.

Privacy-first converters

Build a converter where files never touch a server. Good for legal, medical, or HR documents that have to stay local.

Offline web tools

Ship a PWA that keeps converting with no connection. The whole pipeline runs in WASM, in the browser.

Embedded SaaS converters

Add image-to-PDF to your app's editor without running conversion servers, queues, or storage. See the full Browser Conversion suite.

Design handoff

Combine exported PNG mockups into one PDF for review, then shrink it with Browser Compression before sending.

PRICING

Priced for every team

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

Affordable to all

Conversion runs on the user's own device, so there's no per-page compute bill to pass on. The flat rate is the same at one file a day or a million.

See pricing →

FAQ

Common questions

Does converting PNG to PDF in the browser upload my images anywhere?
No. The conversion runs entirely in the browser through a WebAssembly module, so your PNG files are read, rendered, and written into a PDF on the device with no upload and no server round-trip. Because nothing is transmitted, the tool keeps working offline once the page has loaded.
Can I merge multiple PNG files into one PDF?
Yes. You can pass several PNG images in a single call and get back one multi-page PDF, with one image per page in the order you supply them. The result comes back as a Blob you can download or attach, all in-browser.
Which image formats can I turn into a PDF client-side?
The library accepts PNG, JPEG, and TIFF as inputs, including both single-page and multi-page TIFF. Alongside PDF, the same client-side pipeline can also output TIFF or one JPEG per page, so a single integration covers most image-to-document conversions.
Can I set the PDF page size and control how each image fits the page?
Yes. You can pick a standard page size from A0 through A6 (it falls back to A4 when none is set) and adjust orientation and margins per image. Each image can be scaled to fit the page while keeping its aspect ratio, stretched to fill the page, or kept at its original pixel size.
Can I shrink the output PDF without a server?
Yes. You can set the output resolution (DPI) so high-pixel PNGs are downscaled before they are written into the PDF, which reduces the file size while keeping pages readable. It all happens on the device, so there is no per-page compute cost; to reduce the file further you can run the client-side compression tools on the finished PDF.
Does it work offline, and which browsers are supported?
Once the page and its WebAssembly module have loaded, conversion runs offline with no further network calls, which suits a PWA or an air-gapped internal tool. It works in any modern browser that supports WebAssembly, on desktop and mobile, with no plugins or extensions to install.
How does the API report errors — does it throw exceptions?
Every method resolves with a predictable result object carrying STATUS, DESCRIPTION, and DATA fields instead of throwing. You check STATUS to branch on success or failure and read DESCRIPTION for a human-readable reason, which keeps error handling simple in async code.
How is the PNG-to-PDF library licensed, and can I try it for free?
The converter is included in the license, and because it runs on the user's own device there is no per-page compute bill — the flat rate is the same whether you convert one file a day or a million. You can evaluate it first: the unlicensed demo is fully functional and only adds a watermark band to the output. See the pricing page for current rates.
THE FULL TOOLKIT

Explore the rest of the Browser JS Library

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

Convert PNG to PDF with the free trial

Free signup credit. No card required.