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

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

Описание и применение

Создана полностью клиентская утилита для работы с PDF, которая не отправляет данные на сервер и обрабатывает документы в памяти браузера, обеспечивая быстрый и безопасный процесс объединения, сортировки и создания миниатюр страниц.

Задача

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