Hi there, I spent some time debugging the fo document and I've narrowed down the problem code segment to:
<fo:flow font-size="10pt" flow-name="xsl-region-body"> <fo:block-container border-width="0.1mm" position="absolute" top="0mm" left="0mm" border-left-style="solid" border-right-style="solid" width="100%" height="8.5in"/> </fo:flow> It doesn't matter if there's anything in the block-container, since it displays fine when I run it through a pdf viewer. It should be drawing a border around the flow body. (On the left, and the right). But when I run the fo through the TXTRenderer, it throws the array out of bounds exception. So I changed it to a fo:table with the same attributes, drawing a border around the body and again, same exception. I'm thinking TXTRenderer doesn't like side borders in the body (top and bottom borders are fine). My borders in the header and footer work, and they use the same code. I'm using FOP 0.20.5 with JDK 1.5.0_6. Is there a way to do the borders that will work with TXTRenderer? Thanks for all the help. -- Michael -----Original Message----- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Friday, October 27, 2006 4:06 AM To: fop-users@xmlgraphics.apache.org Subject: Re: TXTRenderer throws ArrayOutOfBoundsException Either you debug yourself to find out what's causing the problem or you'll have to post an FO document (no XSLT!) so we can reproduce the problem. On 24.10.2006 00:24:11 Michael Tran wrote: > Hi! > > I'm having a strange problem with the TXTRenderer for FOP in that its > throwing ArrayOutOfBoundsException when I try to do a conversion to > text from pdf (pdf generated from xsl:fo stylesheet) and then save it > to a file. For most of my stylesheets I'm running it on, it works fine > but for others it throws the exception. I've run the source xml > through my stylesheets and no problems are found there. They all > render the pdf fine and don't complain about any xsl:fo errors. I > don't understand why it would be throwing this exception. > > Has anyone seen this problem or could point me in the right direction > to fix it? > > Here's a stacktrace: > > java.lang.ArrayIndexOutOfBoundsException: 90 at > org.apache.fop.render.txt.TXTRenderer.addStr(TXTRenderer.java:154) > at > org.apache.fop.render.txt.TXTRenderer.addRect(TXTRenderer.java:552) > at > org.apache.fop.render.PrintRenderer.addFilledRect(PrintRenderer.java:2 > 13 > ) > at > org.apache.fop.render.PrintRenderer.doFrame(PrintRenderer.java:273) > at > org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRen > de > rer.java:446) > at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:88) > at > org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRen > de > rer.java:451) > at org.apache.fop.layout.ColumnArea.render(ColumnArea.java:71) > at > org.apache.fop.render.AbstractRenderer.renderSpanArea(AbstractRenderer > .j > ava:100) > at org.apache.fop.layout.SpanArea.render(SpanArea.java:94) > at > org.apache.fop.render.AbstractRenderer.renderBodyAreaContainer(Abstrac > tR > enderer.java:368) > at > org.apache.fop.layout.BodyAreaContainer.render(BodyAreaContainer.java: > 13 > 7) > at > org.apache.fop.render.AbstractRenderer.renderRegions(AbstractRenderer. > ja > va:529) > at > org.apache.fop.render.txt.TXTRenderer.renderPage(TXTRenderer.java:1663 > ) at > org.apache.fop.render.txt.TXTRenderer.render(TXTRenderer.java:1768) > at > org.apache.fop.apps.StreamRenderer.processQueue(StreamRenderer.java:32 > 8) > at > org.apache.fop.apps.StreamRenderer.queuePage(StreamRenderer.java:311) > at org.apache.fop.layout.AreaTree.addPage(AreaTree.java:108) > at > org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:4 > 15 > ) > at > org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338 > ) at > org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262) > at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223) > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > Source) > at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown > Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentD > is > patcher.dispatch(Unknown Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unk > no > wn 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.fop.apps.Driver.render(Driver.java:498) > at com.x.ReportViewer.saveAsFile(ReportViewer.java:346) > > Thanks very much! > > -- > Michael Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]