You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Laurent Richard (JIRA)" <ji...@apache.org> on 2015/08/20 17:17:46 UTC
[jira] [Updated] (PDFBOX-2940) ClassCastException in FDF export
[ https://issues.apache.org/jira/browse/PDFBOX-2940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Laurent Richard updated PDFBOX-2940:
------------------------------------
Description:
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}
I join the sample PDF that was used for this test
was:
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}
> 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
>
> Attachments: formulaire_rempli.pdf
>
>
> 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}
> I join the sample PDF that was used for this test
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org