[ https://issues.apache.org/jira/browse/PDFBOX-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14039766#comment-14039766 ]
Guillaume Bailleul commented on PDFBOX-2020: -------------------------------------------- Hi, 3 isartor tests are not passing with the current 2.0.0-SNAPSHOT (no problem with 1.8.X). Two of the errors are NPE: * 6.2 Graphics\6.2.3 Colour spaces\6.2.3.3 Uncalibrated colour spaces\isartor-6-2-3-3-t02-fail-h.pdf * 6.3 Fonts\6.3.4 Embedded font programs\isartor-6-3-4-t01-fail-g.pdf I guess there is a link with this issue. > PDF/A Validation raises NullPointerException for PDFs without ImageColorSpace > ----------------------------------------------------------------------------- > > Key: PDFBOX-2020 > URL: https://issues.apache.org/jira/browse/PDFBOX-2020 > Project: PDFBox > Issue Type: Bug > Components: Preflight > Affects Versions: 2.0.0 > Environment: Windows 7, Sun JDK7 64Bit > Reporter: Ulrich Wohlfeil > Labels: pdf/a, validation > > TestCode: Example Code http://pdfbox.apache.org/cookbook/pdfavalidation.html > If i check a PDF without ImageColorSpace the example Code raises the > following NullPointerException: > Exception in thread "main" java.lang.NullPointerException > at > org.apache.pdfbox.preflight.content.ContentStreamEngine.validImageColorSpace(ContentStreamEngine.java:323) > at > org.apache.pdfbox.preflight.content.ContentStreamWrapper.processOperator(ContentStreamWrapper.java:179) > at > org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:254) > at > org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:221) > at > org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:203) > at > org.apache.pdfbox.preflight.content.ContentStreamWrapper.validPageContentStream(ContentStreamWrapper.java:76) > at > org.apache.pdfbox.preflight.process.reflect.SinglePageValidationProcess.validateContent(SinglePageValidationProcess.java:180) > at > org.apache.pdfbox.preflight.process.reflect.SinglePageValidationProcess.validate(SinglePageValidationProcess.java:88) > at > org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:73) > at > org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:52) > at > org.apache.pdfbox.preflight.process.PageTreeValidationProcess.validatePage(PageTreeValidationProcess.java:58) > at > org.apache.pdfbox.preflight.process.PageTreeValidationProcess.validate(PageTreeValidationProcess.java:47) > 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:169) > at PdfBox.main(PdfBox.java:33) > I think the method org.apache.pdfbox.pdmodel.PDResources.getColorSpaces > (PDResources.java:311) did not return a object if their is no image color > space but the code line > org.apache.pdfbox.preflight.content.ContentStreamEngine.validImageColorSpace(ContentStreamEngine.java:323) > expects a object in any case. -- This message was sent by Atlassian JIRA (v6.2#6252)