Laurent Richard created PDFBOX-2940:
---------------------------------------
Summary: ClassCastException in FDF export
Key: PDFBOX-2940
URL: https://issues.apache.org/jira/browse/PDFBOX-2940
Project: PDFBox
Issue Type: Bug
Components: AcroForm
Affects Versions: 1.8.10
Reporter: Laurent Richard
Fix For: 1.8.11
We have some simple code extracting FDF from a PDF like
{code}
PDDocument pdf = PDDocument.load(inputStream);
PDAcroForm form = pdf.getDocumentCatalog().getAcroForm();
FDFDocument fdf = form.exportFDF();
{code}
Everything was fine with previous versions of pdfbox (1.8.8 in particular) but
version 1.8.10 throws an exception :
{noformat}
java.lang.ClassCastException:
org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget cannot be
cast to org.apache.pdfbox.pdmodel.interactive.form.PDField
at
org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.addFieldAndChildren(PDAcroForm.java:168)
at
org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.exportFDF(PDAcroForm.java:145)
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]