You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Gilad Denneboom (JIRA)" <ji...@apache.org> on 2014/06/18 22:32:24 UTC

[jira] [Created] (PDFBOX-2148) Handle the Fully Qualified Name of duplicate fields better

Gilad Denneboom created PDFBOX-2148:
---------------------------------------

             Summary: Handle the Fully Qualified Name of duplicate fields better
                 Key: PDFBOX-2148
                 URL: https://issues.apache.org/jira/browse/PDFBOX-2148
             Project: PDFBox
          Issue Type: Improvement
          Components: PDModel
    Affects Versions: 1.8.5
            Reporter: Gilad Denneboom
            Priority: Minor
         Attachments: field name test.java, field name test.pdf

When there are multiple copies with the same field name, the getFullyQualifiedName for each kid in the list of PDField objects returns the name of the parent, followed by ".null". So if the parent field is called "Button2" and it has 4 instances the result of printing out all the names will be:
Button2.null
Button2.null
Button2.null
Button2.null

Acrobat names these widgets using consecutive numbers, like so:
Button2.0
Button2.1
Button2.2
Button2.3

I had a look at the PDF ISO documentation regarding Field Names (12.7.3.2, p. 434) and this convention is not mentioned there, but it might be a good idea to use it anyway, no?

I'm attaching a sample code snippet and a PDF that show this issue.



--
This message was sent by Atlassian JIRA
(v6.2#6252)