Hi Brett,

It's not about "faith", spanning datas across multiple page sequences brings an huge memory saving.
We solve issue of constant OutOfMemory errors (according to heap allocation) going to about 2 MB memory consumption on fully written 100 pages documents.


You have to identify where in your document could be inserted a page break
or
decide to break intentionally after N rows of datas (1 record on your XML file can be M rows on document so M*N is the total rows on document)


In the second case put logic for break when ciclying your datas templates using something like this ($STOP is max number of data rows for page):

<xsl:for-each select="DATA_ROW[position() mod $STOP = 1]">
<fo:page-sequence master-reference="YOUR_MASTER_REFERENCE" initial-page-number="auto">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" width="480pt">
<fo:table-column column-width="85pt"/>
<fo:table-column column-width="15pt"/>
<fo:table-body>
<fo:table-row line-height="30pt">
<fo:table-cell>
<fo:block text-align="center" font-size="10pt" font-family="Courier">title 1</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="center" font-size="10pt" font-family="Courier">title 2</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<xsl:for-each select=".|following-sibling::DATA_ROW[position() &lt; $STOP]">
<xsl:apply-templates select="."/>
</xsl:for-each>
</fo:flow>
</fo:page-sequence>
</xsl:for-each>


<xsl:template match="DATA_ROW">
<fo:table table-layout="fixed" width="480pt">
<fo:table-column column-width="85pt"/>
<fo:table-column column-width="10pt"/>
<fo:table-body>
<fo:table-row line-height="13pt">
<fo:table-cell>
<fo:block text-align="left" font-size="10pt" font-family="Courier">
<xsl:value-of select="YOUR_ROW_KEY_1"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="center" font-size="10pt" font-family="Courier">
<xsl:value-of select="YOUR_ROW_KEY_2"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>


Hope this help
fabrizio


At 02.32 12/03/2004, you wrote:
Hi all,

I am having out of memory issues when transforming my FO -> PDF using
fop-0.20.5rc2. I read that using multiple page sequences in the XSL and
therefore in the FO means that fop will release some memory. I don't see how
I can do this. My XML file is generated dynamically from a database so I
don't know how big it will be. Is there any solutions I can use that uses
multiple page sequences or possible change the xml structure, if not is
there another FOP transformer that isn't as memory intensive. Thanks in
advanced for any help. If I havn't provided enough info please ask and I can
get back to you.

Defend your privacy! Encrypt your email today! http://www.bytefusion.com/secexmail



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to