pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Munn <and...@nmedia.net>
Subject parsing checkbox state in flat PDF form?
Date Sat, 14 Mar 2015 05:56:32 GMT
I have checkboxes and radio buttons in forms that are flat.  The boxes can 
sometimes be fully filled in (solid black) or sometimes what appears to be 
a vector drawn x extending to all 4 corners.

My question is similar to this one from over 2 years ago.

https://www.mail-archive.com/users@pdfbox.apache.org/msg02139.html

I need to programatically determine the state of these check boxes.  I'm 
processing the same forms frequently so I could do something like:

BufferedImage src = pdfRenderer.renderImageWithDPI(1, 600, ImageType.GRAY); 
BufferedImage boxImage = src.getSubimage(234,345,10,10); 

...and then check the color of the pixels in the box to see if it's 
"checked" or not.  But is there a better way?

Thanks,
Andrew




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message