Detecting what would qualify as a blank page?

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
omascia
User
Posts: 48
Joined: Thu Mar 11, 2010 7:07 pm

Detecting what would qualify as a blank page?

Post 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.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17818
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Detecting what would qualify as a blank page?

Post 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
omascia
User
Posts: 48
Joined: Thu Mar 11, 2010 7:07 pm

Re: Detecting what would qualify as a blank page?

Post 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.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17818
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Detecting what would qualify as a blank page?

Post 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
omascia
User
Posts: 48
Joined: Thu Mar 11, 2010 7:07 pm

Re: Detecting what would qualify as a blank page?

Post 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.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17818
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Detecting what would qualify as a blank page?

Post 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
Post Reply