[
https://issues.apache.org/jira/browse/PDFBOX-5440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17540064#comment-17540064
]
Maruan Sahyoun commented on PDFBOX-5440:
----------------------------------------
The screenshot you send is from Acrobat which hides the internal details.
When you create a new field in Acrobat and give it the name "Shubham.gupta"
there are two fields being generated "Shubham" and "gupta" as a child to it. So
Acrobat always dispalys the fully qualified name.
Now when accessing the the fields using PDAcroForm.getFields() you only get the
root level fields - "Shubham" in your case. You'll find that "Shubham" is a
PDNonTerminal field indicating that is has childs which are fields.
PDNonTerminalField.getChildren() will get you all child fields.
PDAcroForm.getFieldTree() gets you all fields.
> PDField- getFullyQualifiedName() method not giving exact form field name
> ------------------------------------------------------------------------
>
> Key: PDFBOX-5440
> URL: https://issues.apache.org/jira/browse/PDFBOX-5440
> Project: PDFBox
> Issue Type: Improvement
> Reporter: Shubham Gupta
> Priority: Minor
> Attachments: Sample Code alongwith Form Field Screenshot.docx
>
>
> Steps to reproduce:
> # Take a pdf having a form field with a form field name having dot(.) in
> between the name.
> # Now try to store the details of the pdf in PDField and use the
> {*}[getFullyQualifiedName|https://pdfbox.apache.org/docs/2.0.0/javadocs/org/apache/pdfbox/pdmodel/interactive/form/PDField.html#getFullyQualifiedName()]{*}()
> method, you will get the string before that dot(.) after the dot(.) string
> neglected. For example, keep a form field name as "Shubham.gupta", when the
> {*}[getFullyQualifiedName|https://pdfbox.apache.org/docs/2.0.0/javadocs/org/apache/pdfbox/pdmodel/interactive/form/PDField.html#getFullyQualifiedName()]{*}()
> is called it will give just "Shubham", not the whole string.
> # Maybe this is something silly that I am raising but this needs to be
> improved as a form field could contain a dot(.) in between its form field
> name.
> I have attached a document for better understanding.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]