YOU.PDF: A FastAPI PDF Toolkit — Extract Text, Merge, Split, Inspect
说明与用途
YOU.PDF 是一个轻量级 FastAPI 服务,提供 PDF 元数据、文本提取、合并和拆分功能,所有操作均在本地完成,无需外部依赖。
问题
PDF tools are either bloated or untrustworthy, forcing users to rely on desktop apps, third‑party services, or custom scripts for common PDF operations.
结果
The toolkit delivers fast, reliable PDF operations in a single file, with in‑memory streaming responses, strict range validation, and a comprehensive test suite that generates real PDFs.
工作流
- 1. Deploy the service via Docker or Render. 2. Send a multipart POST to /info to get metadata. 3. POST to /extract with optional pages to retrieve text. 4. POST to /merge with two or more files to combine. 5. POST to /split with ranges to extract reordered pages. 6. Use the returned PDFs or JSON directly in downstream processes.
证据
Everyone needs PDF surgery sometimes — pull the text out of a report, merge three scanned contracts, extract pages 4–7 for a client.
YOU.PDF takes the middle path a developer actually wants: a small, self-hostable HTTP API for the four operations that cover ~90% of PDF chores.
The test suite generates real PDFs with reportlab and pushes them through the actual HTTP endpoints via FastAPI's TestClient.
Encrypted PDFs are rejected with a clear 400.
- 记录日期: 2026-10-12T22:55:53.581Z