How to Linearize a PDF
Verified local-first workflow
Share this guide
Shares only the public page link — never your files.
In a standard non-linearized PDF, the cross-reference table and catalog sit at the very end of the file, and page 1’s fonts or images may be scattered anywhere inside the byte stream. A browser opening a 30 MB report over HTTP has to download nearly the entire file before displaying the first page. Linearizing (also called Fast Web View) reorganizes the PDF locally using Linearize PDF so viewers can stream and render page 1 right away.
How HTTP byte-range streaming works
Linearization pairs a restructured PDF file with standard HTTP range requests:
- The PDF writer moves a special Linearization dictionary, the first-page object tree, and compressed hint tables (which map page numbers to exact byte offsets) to the opening kilobytes of the file.
- When a viewer (such as Chrome PDFium, Firefox PDF.js, or Safari) opens the URL, it reads the opening chunk and checks whether the web server advertises
Accept-Ranges: bytes. - The viewer renders page 1 immediately, then issues targeted
Range: bytes=...requests (HTTP 206 Partial Content) for only the pages the reader jumps to next.
Powered by qpdf WebAssembly inside a Web Worker
JavaScript-only libraries like pdf-lib do not implement PDF linearization hint tables. IXPDF delegates linearization to qpdf compiled to WebAssembly (qpdf-wasm, ~1.9 MB), which is lazy-loaded only when you run Linearize PDF — keeping the rest of the site fast. Everything executes in your browser’s virtual memory; no PDF bytes are uploaded to any server.
Step-by-step: linearize a PDF locally
- Finalize edits first. Finish merging, compressing, watermarking, or stripping metadata before linearizing.
- Open Linearize PDF. Visit /tools/linearize-pdf/ and drop your PDF (up to 100 MiB).
- Run linearization. Click Run Linearize PDF. The Web Worker initializes
qpdf-wasmon first use and runsqpdf --linearizelocally. - Verify and host. Download
linearized.pdf(note: Document Properties in Acrobat/PDF viewers will show Fast Web View: Yes). Host it on a CDN or web server with byte ranges enabled (Cloudflare Pages, S3/R2, Nginx, and Apache support this by default).
Failure modes & browser limits
- Server or viewer lacks range requests: If a file is served as an email attachment, inside a forced-download
Content-Disposition: attachmentheader, or from an API endpoint that disablesAccept-Ranges, the browser still downloads the full file before viewing. - Corrupted or non-conformant PDFs: Severely broken xref tables can cause linearization to fail. Run Repair PDF first, then linearize the repaired output.
- Encrypted PDFs & 100 MiB guardrail: Locked PDFs must be unlocked before qpdf can rewrite object offsets, and files above 100 MiB are blocked upfront to protect browser tab RAM.
Enable Fast Web View locally
Reorganize PDFs for instant page-one web streaming with qpdf WebAssembly right in your browser.
Open Linearize PDFTry it now
Ready to put this into practice?
Run the tool locally in your browser — no upload, no account, no watermarks. Your file never leaves your device.