rumburak created PDFBOX-3642:
--------------------------------

             Summary:  java.lang.ClassCastException is thrown when flattening 
form with a picture
                 Key: PDFBOX-3642
                 URL: https://issues.apache.org/jira/browse/PDFBOX-3642
             Project: PDFBox
          Issue Type: Bug
          Components: AcroForm
    Affects Versions: 2.0.4
            Reporter: rumburak


Without picture in the form flattening works ok. With picture the following 
exception is thrown:

Exception in thread "main" java.lang.ClassCastException: 
org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject cannot be cast to 
org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject
        at 
org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.resolveNeedsTranslation(PDAcroForm.java:726)
        at 
org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.flatten(PDAcroForm.java:276)
        at 
org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.flatten(PDAcroForm.java:192)
        at test.FlattenIssue.main(FlattenIssue.java:27)

Attaching source PDF form (generated in open office). 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to