Skip to content
huzpsb edited this page Oct 26, 2026 · 1 revision

Web UI

pdfcpu2 also ships as a local-first web app: https://huzpsb.github.io/pdfcpu2/. The Go engine is compiled to WebAssembly and runs inside a Web Worker in your tab — files are opened, processed and written back on your device. There is no backend and no upload endpoint; the only network traffic is the download of the app itself from GitHub Pages.

Use it when you cannot install a binary: a locked-down machine, someone else's computer, or a quick one-off task. Documents stay exactly as local as with the CLI.

Tools

Group Tools
Security encrypt (AES/RC4, user/owner password, permissions), decrypt
Content OCR, solidify, obfuscate, optimize, extract text, watermark / stamp (text or image)
Pages split (span / page numbers / bookmarks), merge (reorder + seam preview), images → PDF
Advanced attachments (list / add / remove / extract), signatures (validate / remove)
Batch apply one tool to many files at once, results returned as a ZIP

These map 1:1 to the CLI commands documented in this wiki — the web app calls the same pkg/api layer through the wasm bridge (webui/bridge.go, webui/ops.go).

Workflow

  1. Add files — drop PDFs or images onto the source panel, or click to browse. PDFs are probed locally (page count, encryption) and get a rendered thumbnail.
  2. Select & order — click a card to select it for the current tool; multi-file tools (merge, images→PDF, batch) show an ordered list with drag-to-reorder, plus a seam preview before merging.
  3. Configure & run — every tool renders its own form, advanced options collapsed behind a toggle. The run button shows what is ready; a busy indicator replaces it while the engine works.
  4. Collect results — one download button per result, Download all for multi-file results, a single ZIP for batch runs. Successful PDF results are added back to the source panel and pre-selected, so you can chain tools (e.g. OCR → extract text).

Preferences

Language (English / 中文), theme (light / dark / system), thumbnail resolution (72–150 dpi) and auto-download live in localStorage only — as do the last used values of each form. Nothing is sent anywhere.

Caveats

  • The wasm engine is ~40 MB; the first visit takes a moment, afterwards it is served from the browser cache.
  • Browser OCR runs single-threaded — expect minutes per scanned page. For larger jobs use the CLI, which parallelizes across cores.
  • The web app covers the everyday subset of commands; the CLI remains the full surface.

Deployment

The app is the webui/static directory. CI builds app.wasm (GOOS=js GOARCH=wasm go build ./cmd/webui) and deploys it to GitHub Pages on every ci:-prefixed commit to main; version.txt carries the build SHA as a cache buster.

See also

Clone this wiki locally