xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Esteban R <eru...@hotmail.com>
Subject Error trying to create PDF with accessibility
Date Tue, 07 Nov 2017 23:13:07 GMT
Hello I'm working in a quite complex java (1.8.0_112) project, using apache-fop 2.2. Windows
10 OS.


It seems that the <accessibility> tag is ignored in the xconf file so I had to enable
it programatically.


After that, I get the following exception when rendering pdf with accessibility enabled:

java.lang.NullPointerException
        at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:422)
        at org.apache.fop.render.intermediate.IFRenderer$TextUtil.flush(IFRenderer.java:1236)
        at org.apache.fop.render.intermediate.IFRenderer.renderText(IFRenderer.java:1063)
        at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:701)
        at org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:926)
        at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:690)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:572)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
        at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:998)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
        at org.apache.fop.render.AbstractRenderer.renderRegion(AbstractRenderer.java:344)
        at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:308)
        at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:737)
        at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:263)
        at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:244)
        at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:587)
        at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:123)
        at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:316)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:226)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:145)
        at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
        at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130)
        at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
        at org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:263)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1401)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
        at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272)
        at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253)
       ... (my classes)
nov 07, 2017 7:54:38 PM org.apache.fop.fo.FOTreeBuilder fatalError
GRAVE: org.xml.sax.SAXParseException; systemId: file:///C:/Users/complete_file_name.fo; lineNumber:
160; columnNumber: 82; java.lang.NullPointerException

The above-mentioned line 160 is:

      <fo:page-sequence master-reference="onlySeq" language="fr-FR" country="fr">



Maybe I'm missing something? I may try to create a full example if needed.


Esteban

Mime
View raw message