xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Driesen <Jan.Drie...@brepols.net>
Subject Surrogate pair error
Date Mon, 24 Feb 2020 11:33:41 GMT
Hi everybody,


We have a document containing the following character: Unicode Character 'CYPRIOT SYLLABLE
RO' (U+10826)
When running fop (2.4) to render a pdf, it fails with the exception pasted below. Attached
you can find a sample fo file that contains the character and produces the error.
I understand that fop 2.3 introduced support for surrogate pairs.

feb 24, 2020 12:24:00 PM org.apache.fop.apps.FopConfParser configure
INFO: Default page-height set to: 11.00in
feb 24, 2020 12:24:00 PM org.apache.fop.apps.FopConfParser configure
INFO: Default page-width set to: 8.50in
feb 24, 2020 12:24:02 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "?" (0xd802) not available in font "Helvetica".
feb 24, 2020 12:24:02 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "?" (0xdc26) not available in font "Helvetica".
feb 24, 2020 12:24:02 PM org.apache.fop.area.RenderPagesModel addPage
SEVERE: Error while rendering page 1
java.lang.StringIndexOutOfBoundsException: String index out of range: 1
        at java.lang.String.charAt(String.java:658)
        at org.apache.fop.util.CharUtilities.containsSurrogatePairAt(CharUtilities.java:417)
        at org.apache.fop.render.pdf.PDFPainter.drawTextWithDX(PDFPainter.java:494)
        at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:436)
        at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:449)
        at org.apache.fop.render.intermediate.IFRenderer$TextUtil.flush(IFRenderer.java:1237)
        at org.apache.fop.render.intermediate.IFRenderer.renderText(IFRenderer.java:1063)
        at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:861)
        at org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:926)
        at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:845)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:704)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:758)
        at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:998)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:689)
        at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:591)
        at org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:789)
        at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:568)
        at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:433)
        at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:380)
        at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:737)
        at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:345)
        at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:318)
        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:243)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:147)
        at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
        at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:139)
        at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:362)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
        at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)
        at org.apache.fop.cli.Main.startFOP(Main.java:183)
        at org.apache.fop.cli.Main.main(Main.java:214)


Is this a bug, or are we missing something?


Thanks,


Jan Driesen
IT Office
Brepols Publishers NV


Mime
View raw message