pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: how to set the field that is used in another calculated field
Date Wed, 19 Apr 2017 19:45:26 GMT
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


Mime
View raw message