How to linearize a pdf for optimal cdn delivery
- Step 1Upload the PDF — Drop the document into the linearizer.
- Step 2Apply linearization — Restructure the PDF for byte-range progressive delivery.
- Step 3Upload to your CDN origin — Upload the linearized PDF to S3, Cloudflare R2, or your CDN origin bucket.
- Step 4Verify CDN byte-range support — Use curl with the Range header to confirm the CDN is serving byte-range requests for the PDF.
Frequently asked questions
Does Cloudflare Pages support byte-range requests for PDFs?+
Yes — Cloudflare Pages and Cloudflare R2 support byte-range requests (Accept-Ranges: bytes) by default.
Should I also enable caching headers for the linearized PDF?+
Yes — set Cache-Control: public, max-age=86400 (or longer) on the PDF CDN path for optimal caching.
Does linearization need to be re-applied after every PDF update?+
Yes — re-linearize any time you update the PDF before re-uploading to the CDN.
Privacy first
All PDF processing runs locally in your browser using PDF-lib and pdf.js. No file is ever uploaded — only metadata counters are saved for signed-in dashboard stats.