Description
We have some simple code extracting FDF from a PDF like
PDDocument pdf = PDDocument.load(inputStream); PDAcroForm form = pdf.getDocumentCatalog().getAcroForm(); FDFDocument fdf = form.exportFDF();
Everything was fine with previous versions of pdfbox (1.8.8 in particular) but version 1.8.10 throws an exception :
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)
I join the sample PDF that was used for this test