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

Maruan Sahyoun edited comment on PDFBOX-3803 at 5/26/17 3:46 PM:
-----------------------------------------------------------------

Fields with the same fully qualified name are treated as the same field with 
multiple occurrences (widget annotations). Now currently PDFBox expects in that 
case a single field dictionary with multiple widget annotations as childs. 
Although the field definition in the sample file is perfectly valid I'm not 
sure what the customers expectation is. If - which is currently the case in the 
sample form - fields with the same fully qualified have a different value this 
is not valid though. 

Now for merging there are three options

a) when merging PDFs with AcroForms which contain fields with the same fully 
qualified field name the field names have to be made unique in order to treat 
the fields independently (that's the way PDFBox currently handles that)
b) when merging PDFs with AcroForms which contain fields with the same fully 
qualified field name the fields are merged into one (that's the first option 
within Adobe Acrobat)
c) PDFs are merged into a collection which means they are still independent 
PDFs  (that's the other within Adobe Acrobat).

[~ssteiner1] which of the above behaviors do you think your customers expect. 
Please keep in mind that the current PDF - as outline above - is invalid as 
field with the same fully qualified field name do have different {{/V}} entries.


was (Author: msahyoun):
Fields with the same fully qualified name are treated as the same field with 
multiple occurrences (widget annotations). Now currently PDFBox expects in that 
case a single field dictionary with multiple widget annotations as childs. 
Although the field definition in the sample file is perfectly valid I'm not 
sure what the customers expectation is. If - which is currently the case in the 
sample form - fields with the same fully qualified have a different value this 
is not valid though. 

Now for merging there are two options

a) when merging PDFs with AcroForms which contain fields with the same fully 
qualified field name the field names have to be made unique in order to treat 
the fields independently (that's the way PDFBox currently handles that)
b) when merging PDFs with AcroForms which contain fields with the same fully 
qualified field name the fields are merged into one (that's one of the options 
for Adobe Acrobat)
c) PDFs are merged into a collection which means they are still independent 
PDFs.

[~ssteiner1] which of the above behaviors do you think your customers expect. 
Please keep in mind that the current PDF - as outline above - is invalid as 
field with the same fully qualified field name do have different {{/V}} entries.

> Fields missing after refreshAppearances
> ---------------------------------------
>
>                 Key: PDFBOX-3803
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3803
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 3.0.0
>            Reporter: simon steiner
>         Attachments: input.pdf
>
>
> Fields missing after viewing in Adobe Reader after running:
>         PDDocument doc = PDDocument.load(new File(input));
>         PDAcroForm acroform = doc.getDocumentCatalog().getAcroForm();
>         if (acroform != null) {
>             acroform.setNeedAppearances(false);
>             acroform.refreshAppearances();
>         }
>         doc.save(output);
>         doc.close();



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to