Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Why I Built a 100% In-Browser Privacy Toolkit (And How to Manipulate PDFs in Memory Without a Backend)

Description and use

A fully client‑side PDF toolkit that processes documents in browser memory, eliminating server uploads and speeding up operations by up to 10× compared to cloud services.

Problem

Need to merge, split, or watermark confidential PDFs without uploading to a remote server.

Outcome

Operations on 50‑page PDFs complete in under 400 ms, 10× faster than cloud pipelines, with no data leaving the user’s machine.

Workflow

  • Upload PDF via file input
  • Read file as ArrayBuffer in browser
  • Parse PDF with pdf-lib (ignoreEncryption:true)
  • Extract page indices and reorder or filter pages
  • Create new PDF document with pdf-lib
  • Copy selected pages using copyPages
  • Serialize new PDF to Uint8Array
  • Create Blob and trigger download via object URL
  • Render thumbnails with pdf.js at reduced scale (0.32) and JPEG data URLs to avoid OOM

Evidence

If you open the browser's Network DevTools while using the app, you won’t see a single POST request carrying file payloads.

Source

Because this runs entirely in browser memory, operations on 50-page documents complete in under 400 milliseconds— which is literally 10x faster than cloud-based upload-and-download pipelines.

Source

To keep memory consumption minimal, I restricted the thumbnail viewport scale to 0.32 and piped the canvas to low-overhead JPEG Data URLs.

Source

  • Record date: 2026-11-02T11:13:54.960Z