Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4136

NullPointerException in StructureTreeMerger.createKidEntryFromInt

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.0.4
    • Fix Version/s: None
    • Component/s: Parsing
    • Labels:
      None

      Description

      Trying to embed a certain PDF image in an XSL-FO document using Apache FOP:

       

       [exec] Caused by: java.lang.NullPointerException
           [exec]     at org.apache.fop.render.pdf.pdfbox.StructureTreeMerger.createKidEntryFromInt(StructureTreeMerger.java:334)
           [exec]     at org.apache.fop.render.pdf.pdfbox.StructureTreeMerger.setCurrentSessionElemKid(StructureTreeMerger.java:485)
           [exec]     at org.apache.fop.render.pdf.pdfbox.TaggedPDFConductor.configureCurrentSessionElem(TaggedPDFConductor.java:76)
           [exec]     at org.apache.fop.render.pdf.pdfbox.TaggedPDFConductor.handleLogicalStructure(TaggedPDFConductor.java:71)
           [exec]     at org.apache.fop.render.pdf.pdfbox.AbstractPDFBoxHandler.createStreamForPDF(AbstractPDFBoxHandler.java:115)
           [exec]     at org.apache.fop.render.pdf.pdfbox.PDFBoxImageHandler.handleImage(PDFBoxImageHandler.java:71)
           [exec]     at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
           [exec]     at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
           [exec]     at org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
           [exec]     at org.apache.fop.render.pdf.PDFPainter.drawImageUsingURI(PDFPainter.java:218)
           [exec]     at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:181)
           [exec]     at org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1294)
           [exec]     at org.apache.fop.render.AbstractPathOrientedRenderer.drawImage(AbstractPathOrientedRenderer.java:969)
           [exec]     at org.apache.fop.render.AbstractPathOrientedRenderer.drawBackground(AbstractPathOrientedRenderer.java:308)
           [exec]     at org.apache.fop.render.intermediate.IFRenderer.drawBackground(IFRenderer.java:1383)
           [exec]     at org.apache.fop.render.AbstractPathOrientedRenderer.drawBackground(AbstractPathOrientedRenderer.java:215)
           [exec]     at org.apache.fop.render.AbstractPathOrientedRenderer.drawBackAndBorders(AbstractPathOrientedRenderer.java:173)
           [exec]     at org.apache.fop.render.AbstractPathOrientedRenderer.drawBackAndBorders(AbstractPathOrientedRenderer.java:145)
           [exec]     at org.apache.fop.render.intermediate.IFRenderer.renderBlockViewport(IFRenderer.java:795)
           [exec]     at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:593)
           [exec]     at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:998)
           [exec]     at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
           [exec]     at org.apache.fop.render.AbstractRenderer.renderRegion(AbstractRenderer.java:344)
           [exec]     at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:308)
           [exec]     at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:737)
           [exec]     at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:263)
           [exec]     at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:244)
           [exec]     at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:587)
           [exec]     at org.apache.fop.area.RenderPagesModel.renderPage(RenderPagesModel.java:193)
           [exec]     at org.apache.fop.area.RenderPagesModel.checkPreparedPages(RenderPagesModel.java:174)
           [exec]     at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:146)
           [exec]     at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:316)
           [exec]     at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:226)
           [exec]     at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:145)
           [exec]     at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
           [exec]     at org.apache.fop.fo.DelegatingFOEventHandler.endPageSequence(DelegatingFOEventHandler.java:114)
           [exec]     at org.apache.fop.accessibility.fo.FO2StructureTreeConverter.endPageSequence(FO2StructureTreeConverter.java:148)
           [exec]     at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:145)
           [exec]     at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
           [exec]     at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
           [exec]     at net.sf.saxon.event.ContentHandlerProxy.endElement(Unknown Source)
           [exec]     at net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:228)
           [exec]     at net.sf.saxon.event.ComplexContentOutputter.endElement(ComplexContentOutputter.java:578)
           [exec]     at net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:459)
           [exec]     at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
           [exec]     at org.apache.xerces.impl.XMLNSDocumentScannerImplXerces.scanEndElement(Unknown Source)
           [exec]     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
           [exec]     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
           [exec]     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
           [exec]     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
           [exec]     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
           [exec]     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
           [exec]     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
           [exec]     at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
           [exec]     at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:427)
           [exec]     at net.sf.saxon.event.Sender.send(Sender.java:164)
           [exec]     at net.sf.saxon.jaxp.IdentityTransformer.transform(IdentityTransformer.java:383)

      If my client allows me to attach the problem PDF I will.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                radu_coravu Radu Coravu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: