Hi all,

I'm trying to implement an infinite loop of page-sequences (expecting to spare 
memory to render big pdf) I tested my code with both fop 0.20.5 and 0.94, but 
no changes with memory consumption were visible. So I suppose (hope also) that 
I coded something wrong in the XSL file or in the XML one:

XSL file content:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <xsl:decimal-format decimal-separator="," grouping-separator=" "/>

  <xsl:param name="label-pageNumber" select="'page'"/>
  <xsl:param name="pageheight" select="'29.7cm'"/>
  <xsl:param name="pagewidth" select="'21cm'"/>
  <xsl:param name="margin" select="'0.5cm'"/>

  <xsl:template match="/">
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
      <fo:layout-master-set>                    
        <fo:simple-page-master master-name="Portrait" 
page-height="{$pageheight}" page-width="{$pagewidth}"  margin="{$margin}">
          <fo:region-body margin-top="2.5cm" margin-bottom="1cm"/>
          <fo:region-before extent="2.5cm"/>
          <fo:region-after extent="0.5cm"/>
          </fo:simple-page-master>
          <fo:simple-page-master master-name="Landscape" 
page-height="{$pageheight}" page-width="{$pagewidth}" margin="{$margin}">
          <fo:region-body margin-top="2.5cm" margin-bottom="1cm"/>
          <fo:region-before extent="2.5cm"/>
          <fo:region-after extent="0.5cm"/>
        </fo:simple-page-master>
      </fo:layout-master-set>

      <xsl:apply-templates select="report/pagesequence"/>

    </fo:root>
  </xsl:template>

  <xsl:template match="report/pagesequence">
    <fo:page-sequence 
master-reference="{/report/pagesequence/orientation/@value}">

      <!--HEADER-->
      <fo:static-content flow-name="xsl-region-before">
        ...
      </fo:static-content>

      <!--FOOTER-->
      <fo:static-content flow-name="xsl-region-after">
        ...
      </fo:static-content>

      <!--BODY-->
      <fo:flow flow-name="xsl-region-body">
      <fo:table border-width="0.37px" border-style="solid">
      <fo:table-column column-width="proportional-column-width(1)"/>
        <fo:table-column column-width="proportional-column-width(1)"/>
          <xsl:apply-templates select="table"/>
        </fo:table>

        <!--fo:block id="theEnd"/-->

      </fo:flow>
    </fo:page-sequence>
  </xsl:template>



And then in the XML file I have a succession of the following block (I don't 
know how much of them)

<?xml version="1.0" encoding="UTF-8"?>
  <report>
    <pagesequence>
      <orientation value="Portrait"/>
      <header>
      </header>
      <footer/>
      <table>
      </table>
    </pagesequence>
    <pagesequence>
      <orientation value="Portrait"/>
      <header>
      </header>
      <footer/>
      <table>
      </table>
    </pagesequence>

I was only using one page sequence until now and experiencing memory problems 
for average sized report (500 pages) with -Xmx500M already so I though that 
using multiple page sequences, would spare me some memory (I have a lot of fo 
element), but nothing, the report looks exactly the same! I expected a page 
break after each pagesequences in the PDF, page numbering problems and so on, 
but nothing like that happened. Good news afterwards, but on the other hand I 
still got OutOfMemoryException if I try to report more than 500 pages. Even 
disabling the total page numbering brings nothing.

So I hope that someone can tell me what I coded wrong.

Thank you for your help,

Miro


__________________________________________
 
Ing. Miroslav Gregáň
Member of the "Siemens IT Solutions and Services" department
from the PSE SK SES TEC SK2 team
Program and System Engineering
Slovakia
Software Engineering Services
Technology Competences
Skupina 2 (Java and OpenSource Technologies)
Siemens Program and System Engineering s.r.o.
Dubravska cesta 4
845 37 Bratislava
Slovak Republic

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

Reply via email to