Automatically detect and remove blank pages from your PDF document.
Detecting a blank page in a PDF is surprisingly difficult. Unlike a raster image where you can just check if every pixel is white, a PDF page is a complex stream of rendering instructions.
This tool uses a multi-layered heuristic approach to scan the PDF object stream:
q and Q for saving/restoring graphics states) but no text drawing (Tj) or path painting (S, f) operators exist, the page is likely blank./Annots dictionary to ensure no interactive elements exist before declaring it blank.Parsing the raw instruction stream of every page in a 1,000-page document requires massive CPU cycles. We offload this heavy parsing logic to a Web Worker running compiled WebAssembly, keeping the UI perfectly smooth.
Why is detecting a blank PDF page more complicated than detecting a blank JPEG?