avoid ClassCastException
@@ -473,6 +473,7 @@ class AbstractPDF2XHTML extends PDFTextStripper {
if (annotation instanceof PDAnnotationFileAttachment) {
PDAnnotationFileAttachment fann = (PDAnnotationFileAttachment) annotation;
+ if (fann.getFile() instanceof PDComplexFileSpecification) {
PDComplexFileSpecification fileSpec = (PDComplexFileSpecification) fann.getFile();
try {
AttributesImpl attributes = new AttributesImpl();
@@ -485,6 +486,7 @@ class AbstractPDF2XHTML extends PDFTextStripper {
} catch (IOException e) {
handleCatchableIOE(e);
}
+ }
} else if (annotation instanceof PDAnnotationWidget) {
handleWidget((PDAnnotationWidget)annotation);
}
