pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Baker, Ricky" <ricky.ba...@ttu.edu>
Subject RE: how to set the field that is used in another calculated field
Date Wed, 19 Apr 2017 20:42:46 GMT
Maruan, I can use the getChildren and see the fields but what method can I use to get the field
name? 


Ricky



-----Original Message-----
From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de] 
Sent: Wednesday, April 19, 2017 2:45 PM
To: users@pdfbox.apache.org
Subject: Re: how to set the field that is used in another calculated field

Hi,

> Am 19.04.2017 um 21:25 schrieb Baker, Ricky <ricky.baker@ttu.edu>:
> 
> I am trying to user the "getKids" but the method does not show up. I have downloaded
all the jars for 2.0.5.
> 
> PDField field2 = acroForm.getField('theFieldName');
> 
> List theKids = field2.getKids();

you might have a sample code from PDFBox 1.8.x. getKids() is no longer available.

To travers the field hierachy you can either use PDAcroForm.getFieldTree or you can check
if a field is an instance of

PDNonTerminalField -> there are child fields PDTerminalField -> there are no child fields

If you have a PDNonTerminalField i.e. a field which has fields as ancestors then use PDNonTerminalField.getChildren().

BR
Maruan


> 
> What am I missing to use this feature?
> 
> 
> thanks
> Ricky


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


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


Mime
View raw message