You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2014/10/13 22:45:35 UTC

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

    [ https://issues.apache.org/jira/browse/PDFBOX-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14169916#comment-14169916 ] 

Andreas Lehmkühler edited comment on PDFBOX-2148 at 10/13/14 8:45 PM:
----------------------------------------------------------------------

The current output of the PrintFields examples is as follows
{code}
1 top-level fields were found on the form
|--Button2
|  |--Button2 = no value available,  type=org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox
|  |--Button2 = no value available,  type=org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox
|  |--Button2 = no value available,  type=org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox
|  |--Button2 = no value available,  type=org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox
{code}


was (Author: lehmi):
The current output of the PrintFields examples is as follows

1 top-level fields were found on the form
|--Button2
|  |--Button2 = no value available,  type=org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox
|  |--Button2 = no value available,  type=org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox
|  |--Button2 = no value available,  type=org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox
|  |--Button2 = no value available,  type=org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox

> 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
>             Fix For: 2.0.0
>
>         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.3.4#6332)