pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Munn <and...@nmedia.net>
Subject Re: PDFBox detecting checked/unchecked checkboxes
Date Sun, 26 Apr 2015 16:54:50 GMT
On Sun, 26 Apr 2015, Tilman Hausherr wrote:
> Am 26.04.2015 um 07:10 schrieb Andrew Munn:
> > Is there some trick to this stuff that I should know?
> Yes, "acroform". See the PrintFields example in the source package :-)

I think I looked at that a while back and didn't get anyplace.  I just 
tried to run the PrintFields app and I get a NullPointerException.  I am 
thinking the checkboxes in my form are just stored as black squares, not 
completed form fields.   Is that possible?

        PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog();
        PDAcroForm acroForm = docCatalog.getAcroForm(); // returns null
        List<PDFieldTreeNode> fields = acroForm.getFields(); //NPE here

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

View raw message