[
https://issues.apache.org/jira/browse/PDFBOX-962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15058799#comment-15058799
]
Tilman Hausherr commented on PDFBOX-962:
----------------------------------------
I wonder if it works at all?
{code}
PDAcroForm acroForm = docCatalog.getAcroForm();
if (acroForm == null)
{
acroForm = new PDAcroForm(pdfDocument);
}
docCatalog.setAcroForm(acroForm);
acroForm.importFDF(xfdfDocument);
{code}
xfdfDocument is the XFDF file, docCatalog is from an ordinary PDF document.
Running this code does nothing, i.e. the acroform has no fields.
> All sort of Problems when importing Xfdf files into PDFs -> damaged pdfs and
> NPEs
> ----------------------------------------------------------------------------------
>
> Key: PDFBOX-962
> URL: https://issues.apache.org/jira/browse/PDFBOX-962
> Project: PDFBox
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 1.4.0
> Environment: kubuntu 10.04.2 LTS, jvm 1.6.2
> Reporter: Konstantinos Kostarellis
> Priority: Critical
> Labels: acroform, xfdf
> Attachments: kbb-NPE.pdf.zip
>
>
> When trying to merge PDFs with there corresponding XFDFs all sort of Problems
> occur.
> I created different pdfs with form fields and a "sendbutton". (The Sendbutton
> triggers a send-action to
> send the form data via POST-Request to a URL in the XFDF format).
> Merging that xfdf data with the pdf worked only for the simplest most minimal
> Example: 1 Text-Input + Send Button.
> In the other cases I experienced some of the following problems
> - Missing checkbox
> - NPE in importFDF (acroForm == null)
> - Miss-rendered send-button (not working any longer: either URL damaged or
> document no send-able with strange Adobe message)
> I tried doing the same with the evaluation Version of Aspose Pdf Kit for Java
> which worked fine in all of that cases.
> I could provide examples of pdfs and and corresponding xfdf that show that
> faulty behavior
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]