Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.5
-
None
Description
public static void main(String[] args) throws IOException { PDDocument.load(new File("D1790B.pdf")).getDocumentCatalog().getAcroForm().getFields(); }
throws
Exception in thread "main" java.lang.ClassCastException: org.apache.pdfbox.cos.COSDictionary cannot be cast to org.apache.pdfbox.cos.COSArray at org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.getFields(PDAcroForm.java:368) at pdfboxpageimageextraction.PDFBOX3777.main(PDFBOX3777.java:20)
msahyoun wrote in the mailing list
the field definition in the AcroForm is wrong as the field root is defined as a dictionary and not as an array as it's required by the PDF spec.
...
I think we should fix that as Adobe Reader and another viewer I tested can open the form just fine. So we should do the same.