Sanye Hub

pdf.js freezes on large PDFs in the browser — what can you do?

When a web page “opens” or “compresses” a large PDF with pdf.js painting whole pages as bitmaps…

pdf.js freezes on large PDFs in the browser — what can you do?

What you can do

  • Compress before preview: Prefer tools that recompress embedded images only (for example PDF Compress) instead of rasterizing every page.
  • Change preview strategy: For huge decks, use PDF Preview (coarse tiles + viewport refine) instead of full-fidelity paint of the whole file.
  • Split or down-sample exports: Split long contracts; lower PPI when exporting from design tools.
  • Avoid weak devices: Phones or 8 GB laptops struggle with 100 MB+ image-heavy PDFs—use server or desktop tools first.

FAQ

Does web PDF compress always need pdf.js?

No. Many online compressors upload and re-encode on a server. Some only touch embedded bitmaps without full-page rasterization—check the product notes.

How large is “too large”?

No hard cutoff. Image-heavy, many pages, or huge page sizes hurt more. Tens of MB of scans can stall phones; 100 MB Figma exports often jank on mid-range laptops.

Will text stay selectable after compress?

If only embedded images are recompressed, vectors and text usually remain. Full-page rasterization often yields an image-only PDF.