[
https://issues.apache.org/jira/browse/PDFBOX-2755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14945289#comment-14945289
]
Maruan Sahyoun commented on PDFBOX-2755:
----------------------------------------
I've changed the ticket title to better describe the issue. There are 3 types
of interactive PDF forms
- classic AcroForms i.e. the form contains a /Fields array
- dynamic XFA forms i.e. the form contains no or an empty /Fields array and
there is an XFA entry
- hybrid forms i.e. the form contains a /Fields array and an XFA entry
For hybrid forms we are currently (only) updating the /Fields but not the data
contained in the XFA. When an XFA aware reader such as Adobe Reader opens the
form it looks for the current data in the XFA and NOT in the /Fields. An XFA
unaware reader looks at the /Fields content. So in order to properly support
hybrid forms for XFA aware readers in addition to updating the /Fields values
we also need to update the XFA data. Currently XFA handling is only implemented
to allow one to extract (externally update) and (re-) set the XFA content.
[~lehmi] Many of the XFA PDFs have additional usage rights applied which means
that we need to have the extended incremental update functionality to properly
support that as otherwise we can update the document but the user get's an
error that the document has been modified and the usage rights are removed.
> Support filling hybrid PDF forms
> --------------------------------
>
> Key: PDFBOX-2755
> URL: https://issues.apache.org/jira/browse/PDFBOX-2755
> Project: PDFBox
> Issue Type: Improvement
> Components: AcroForm
> Affects Versions: 1.8.9, 1.8.10, 2.0.0
> Reporter: hui xu
> Assignee: Maruan Sahyoun
> Fix For: 2.1.0
>
> Attachments: formtestFailed.pdf, formtestOK.pdf
>
>
> Ran SetField.java in package org.apache.pdfbox.examples.fdf, the field value
> is changed but can not been saved in pdf file.
> I added 2 more lines code:
> List<PDField> newList = new ArrayList<PDField>();
> .................................
> acroForm.setFields(newList);
> The pdf was saved with the change. But reload the saved pdf file and try to
> reset some values, it throws NullPointerException, the file can't getFields().
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]