pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodney Kite <rkit...@yahoo.com.INVALID>
Subject Re: Traversing and filling a PDF with 2.0
Date Thu, 29 Oct 2015 06:53:17 GMT
Not sure if there is a form object under a PDField?   I found this which looks similar.

List<PDField> kids = ((PDNonTerminalField)pdField).getChildren();

      From: Maruan Sahyoun <sahyoun@fileaffairs.de>
 To: users@pdfbox.apache.org; Rodney Kite <rkite01@yahoo.com> 
 Sent: Thursday, October 29, 2015 2:34 AM
 Subject: Re: Traversing and filling a PDF with 2.0
   
Hi,

> Am 29.10.2015 um 07:23 schrieb Rodney Kite <rkite01@yahoo.com.INVALID>:
> 
>    I have been using PDFBox 1.8 and have just tried 2.0.  I have been using PDFBox
to open a blank goverment PDF and fill out fields while walking the document like a DOM tree. 

> 
> So I have been using PDField.getKids() a lot to traverse the document. 

you can use

for (PDField field : form.getFieldTree())
{

    
... (do something)
}

BR
Maruan



> 
> Can this still be done?  Is there an example on how to do it?  I have looked at the
examples with the source but only see getting a field by name and setting it in the SetField.java
example.  
> 


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