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

How I Built a 100% Client‑Side PDF Toolkit with Zero Cloud Uploads

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

PDFSeal — полностью клиентский инструмент для работы с PDF, который объединяет, добавляет водяные знаки, сжимает, шифрует и очищает метаданные без обращения к облаку, используя Vue 3, pdf.js, pdf‑lib и Web Crypto API.

Задача

Enterprise teams need to merge, watermark, and compress confidential PDFs for a bidding portal, but existing solutions require uploading to cloud services or running heavy self‑hosted servers.

Результат

PDFSeal delivers a zero‑backend, zero‑cloud PDF toolkit that merges, watermarks, compresses, encrypts, and sanitizes PDFs entirely in the browser, meeting strict size limits and confidentiality requirements while requiring only static assets to be served.

Рабочий процесс

  • 1. Load PDFs into the browser via drag‑and‑drop or file picker.
  • 2. Use pdf.js to parse and render pages for preview and thumbnail navigation.
  • 3. Use pdf‑lib to merge documents, rearrange pages, and inject canvas‑based watermarks.
  • 4. Run the adaptive compression engine: detect vector vs scanned content, perform lossless structural optimization or lossy rasterization, and execute a 6‑iteration bisection search to meet target file size.
  • 5. Apply client‑side encryption with dual‑tier passwords and 32‑bit permission bitmasks using SubtleCrypto and pdf‑lib.
  • 6. Sanitize metadata by removing /Info, /Metadata, /PieceInfo, and /Thumb entries and rebuild the cross‑reference table.
  • 7. Export the final PDF as a Blob, optionally zip multiple files, and provide a download link—all without any server round‑trips.

Доказательства

PDFSeal is an open‑source (AGPL‑3.0), zero‑backend PDF suite where every operation executes strictly inside browser RAM, paired with an offline‑first PWA architecture and visual batch pipelines.

Источник

The adaptive compression engine uses a 6‑iteration bisection search paired with target‑weighted secant interpolation to converge on the exact byte ceiling.

Источник

Client‑side encryption uses SubtleCrypto and pdf‑lib to compute hash chains and apply standard AES‑256 cipher blocks.

Источник

  • Дата записи: 2026-09-21T07:30:38.731Z