[
https://issues.apache.org/jira/browse/PDFBOX-2755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14491630#comment-14491630
]
Maruan Sahyoun commented on PDFBOX-2755:
----------------------------------------
it doesn't matter if it's a global field or not as the data binding is defined
for the XFA form template and the data content in the XFA (xfa:datasets:data)
contains empty values for the fields. When Adobe Reader opens the form the XFA
is taken, the xfa:template is read, merged with the content of xfa:dataset:data
and rendered.
As pointed out above - if you fill the form using the AcroForm field
definitions you need to delete the XFA content. If you want to keep the XFA
content then you need to replace the xfa:datasets:data content with the XML
data containing prefilled values.
> Can't save the change to pdf file
> ---------------------------------
>
> Key: PDFBOX-2755
> URL: https://issues.apache.org/jira/browse/PDFBOX-2755
> Project: PDFBox
> Issue Type: Bug
> Components: AcroForm
> Affects Versions: 1.8.9
> Reporter: hui xu
> Priority: Critical
> 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]