Hi, > Am 19.04.2017 um 22:42 schrieb Baker, Ricky <[email protected]>: > > Maruan, I can use the getChildren and see the fields but what method can I > use to get the field name? >
PDField.getFullyQualifiedName() and PDField.getPartialName() Please also take a look at the API documentation https://pdfbox.apache.org/docs/2.0.5/javadocs/org/apache/pdfbox/pdmodel/interactive/form/package-summary.html and the examples in the pdfbox-examples subproject. There are also unit tests which show some of the API usage. BR Maruan > > Ricky > > > > -----Original Message----- > From: Maruan Sahyoun [mailto:[email protected]] > Sent: Wednesday, April 19, 2017 2:45 PM > To: [email protected] > 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 <[email protected]>: >> >> 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: [email protected] > For additional commands, e-mail: [email protected] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

