跳到正文
DEV Community· PDFDistrict·· 33 分鐘前AI 評分40

我製作了 PDFDistrict:21 款免費 PDF 工具,檔案不會上載

I built 21 free PDF tools that never upload your files

AI 導讀

作者製作了 PDFDistrict,提供 21 款免費 PDF 工具,所有檔案處理都在瀏覽器內完成,不會傳送至伺服器。網站以 pdf-lib 編輯 PDF、以 pdf.js 渲染,檔案上限為 100 MB;工具毋須帳戶,支援英文及西班牙文。此瀏覽器工具不支援 OCR、PDF 轉 Word、編輯 PDF 內原有文字或開啟受密碼保護的檔案。

正文

Every time I needed to merge two PDFs or sign a form, I ended up on a site that uploaded the file to a server. That's fine for a restaurant menu. It's less fine for a contract, an ID or a bank statement.

So I built PDFDistrict, a set of 21 free PDF tools where all the processing happens in your browser. The file is read into memory, processed there, and handed back as a download. Nothing is sent to a server.

This post covers how it works, what I learned, what it can't do, and how to check the "no upload" claim yourself instead of taking my word for it.

How it's built

  • A plain static site: HTML, CSS and JavaScript, no framework.
  • pdf-lib does the editing: merge, split, rotate, add text, images and signatures, page numbers, watermarks and metadata.
  • pdf.js does the rendering: thumbnails, previews, PDF to JPG/PNG and PDF to text.
  • No backend. The server only hands out the website files.

I built it with Claude as a coding assistant along the way.

Every tool works the same way: you pick a file, the browser opens it in memory, the library does the job, and you get the result as a normal download.

Things I learned building it

1. Load the heavy libraries only when needed. The PDF libraries are big, so the home page doesn't load them at all. They load the first time you open a tool, which keeps the site fast. Once a tool is open, it also keeps working if your connection drops halfway through.

2. Removing metadata is more than clearing the title and author. A PDF can store its metadata in two places. If you only clear the obvious one (title, author, dates), a second hidden copy survives. To really strip it, both have to go.

3. "Compress" in the browser has honest limits. My compressor reorganizes how the file is stored, which helps with some PDFs. It doesn't re-encode images, so a 30 MB scanned document won't shrink much. I'd rather say that up front than promise magic.

4. Memory is the real ceiling. Everything happens in the browser's memory, so files are capped at 100 MB. Bigger files work on a computer but get unreliable on phones.

How to check that nothing is uploaded

You don't have to trust me:

  1. Open a tool and your browser's developer tools, Network tab.
  2. Clear the list, then drop in a PDF and run the tool.
  3. You'll see the site's own files and, since the site is free and ad-supported, some ad requests. What you won't see is your file being sent anywhere.

A second test: open a tool, turn off your Wi-Fi, and run it. It still works, because there's no server step.

What it doesn't do

Being browser-only has trade-offs, so to be clear:

  • No OCR.
  • No PDF to Word.
  • It can't edit the text that's already inside a PDF (you can add text on top).
  • It can't open password-protected files.

For those jobs, a server-based tool or a desktop app is the better choice.

The 21 tools

Merge, split, compress, organize, reorder, rotate, delete pages, extract pages, crop, sign, add text, add an image, watermark, page numbers, image to PDF, PDF to JPG, PDF to PNG, PDF to text, resize images to PDF, remove metadata and preview. The site is in English and Spanish.

It's free and needs no account: pdfdistrict.com.

I'd love feedback, especially on what's missing or broken.

來源:DEV Community · dev.to