Process untrusted PDFs in a bounded worker
Indexing, rendering and visually analyzing a PDF require different access to its bytes and pages. Large or malformed documents also need resource limits.
Decision
Section titled “Decision”PDF operations run through a bounded private worker. Keep the original separate from extracted text, OCR output and a publication’s synthesized brief.
Consequences
Section titled “Consequences”A text preview may be insufficient for a chart or scan. Choose the least expensive operation that preserves the evidence you need and inspect the resulting page.
Related guide · Decision index
Implementation api/src/lib/pdfWorker.ts. Behavior reviewed 3 December 2026.