Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect Blank Page #39

Open
aghausman opened this issue Mar 19, 2021 · 1 comment
Open

Detect Blank Page #39

aghausman opened this issue Mar 19, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@aghausman
Copy link

Is your feature request related to a problem? Please describe.
The library should be able to detect blank pages. IPageReader should have a property or a function to return the number of objects or anything that can help to identify if the current page is empty.

Describe the solution you'd like
As per my limited understanding of pdfium, probably use FPDFPage_CountObject function to get the number of objects. Not 100% sure, open to more discussions.

Describe alternatives you've considered
IPageReader.GetText is always empty even when the page is not blank. I tested on the pdfs that have images and text both.
IPageReader.GetImage pretty much return the page as an image. Can a blank image be used to identify if the page is blank?

@Modest-as
Copy link
Member

This is a very ambiguous request, what does it mean for a page to be blank? Do apps consider a page that has embedded image of white page an empty page? I think as suggested it would be more useful to expose CountObject response from the PageReader and let the consumer decide what to do with it. It would be a nice PR if anyone is up to contributing to open source.

@Modest-as Modest-as added help wanted Extra attention is needed enhancement New feature or request labels May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants