[ 
https://issues.apache.org/jira/browse/PDFBOX-2486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14215884#comment-14215884
 ] 

Maruan Sahyoun commented on PDFBOX-2486:
----------------------------------------

[~tilman] as for the patch it might be better to make the getActions method 
available in PDFieldTreeNode as AA entries are possible on terminal and non 
terminal fields as this is defined in "Entries common to all field 
dictionaries“ of the PDF spec and use that. The method needs to move up anyway.


> ClassCastException in preflight: PDNonTerminalField cannot be cast to PDField
> -----------------------------------------------------------------------------
>
>                 Key: PDFBOX-2486
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2486
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm, Preflight
>    Affects Versions: 2.0.0
>            Reporter: Tilman Hausherr
>         Attachments: 004324.pdf, 006654.pdf, 006982.pdf, PDFBOX-2486.patch
>
>
> I get this with the attached files:
> {code}
> Exception in thread "main" java.lang.ClassCastException: 
> org.apache.pdfbox.pdmodel.interactive.form.PDNonTerminalField cannot be cast 
> to org.apache.pdfbox.pdmodel.interactive.form.PDField
>       at 
> org.apache.pdfbox.preflight.process.AcroFormValidationProcess.exploreFields(AcroFormValidationProcess.java:107)
>       at 
> org.apache.pdfbox.preflight.process.AcroFormValidationProcess.validate(AcroFormValidationProcess.java:60)
>       at 
> org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:73)
>       at 
> org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:88)
>       at 
> org.apache.pdfbox.preflight.PreflightDocument.validate(PreflightDocument.java:168)
>       at 
> org.apache.pdfbox.preflight.Validator_A1b.runSimple(Validator_A1b.java:161)
>       at 
> org.apache.pdfbox.preflight.Validator_A1b.main(Validator_A1b.java:126)
> {code}



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

Reply via email to