pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: parsing checkbox state in flat PDF form?
Date Sat, 14 Mar 2015 08:47:44 GMT
dependent on the PDF content you might also be able to inspect the graphics commands using
PDFStreamEngine or PDFGraphicsStreamEngine

BR
Maruan

> Am 14.03.2015 um 06:56 schrieb Andrew Munn <andrew@nmedia.net>:
> 
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message