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

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

说明与用途

一个完全在浏览器内存中处理 PDF 的客户端工具包,消除了服务器上传,操作速度比云服务快 10 倍。

问题

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

结果

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

工作流

  • 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

证据

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

来源

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.

来源

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

来源

  • 记录日期: 2026-11-02T11:13:54.960Z