Page 1 of 1

Detecting what would qualify as a blank page?

Posted: Tue Mar 31, 2015 4:13 pm
by omascia
What path could be followed to try to detect 'blank pages' from a PDF made of raster image pages?
We're talking about 1bit images here.
I'm just asking for ideas or hints, I'll dig the details.

Re: Detecting what would qualify as a blank page?

Posted: Wed Apr 01, 2015 12:14 pm
by Tracker Supp-Stefan
Hello Omascia,

If you are certain that all pages will contain only raster image data and nothing else - you can export those images using the PDF Tools SDK, and then perform your checks on whether or not those images are "empty".

If the file can contin other elements (e.g. annotations added later) - then you can try to use the Viewer Simple DLL SDK to rasterize the pages and draw them to a DC, and then handle the raster data from there on.

Regards,
Stefan

Re: Detecting what would qualify as a blank page?

Posted: Wed Apr 01, 2015 2:56 pm
by omascia
Thanks a lot Stefan. Though I'd say these steps I knew about them. The intent of my question was a bit broader (though reading my text, yes that was not so clear) and about image processing tricks usually used to classify a page content (represented as a raster image) as blank. I see there is a forum for Image-XChange, I'll rephrase there, it'll be more on topic. Again, thank you.

Re: Detecting what would qualify as a blank page?

Posted: Wed Apr 01, 2015 3:07 pm
by Tracker Supp-Stefan
Hello omascia,

Yes you can post there as well, but I do not think there are any ready built algorithms we can provide that will help you in your endeavour. We could provide the tools, but you will have to implement the logic to determine when a page is considered empty (e.g. more than 99% of the pixels are white).

Regards,
Stefan

Re: Detecting what would qualify as a blank page?

Posted: Wed Apr 01, 2015 3:15 pm
by omascia
Understood. I have some ideas of how to do it anyway and how to dismiss non significant pixels first. Was checking if there was a known golden path with ImageXChange 4 before re-inventing the wheel.

Again thanks for these quick answers.

Re: Detecting what would qualify as a blank page?

Posted: Wed Apr 01, 2015 3:55 pm
by Tracker Supp-Stefan
Hi omascia,

Glad to hear you have some ideas on your own, and sorry that I could not help further!

Regards,
Stefan