DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23342>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23342

OutOfMemoryError exception processing large XML files

           Summary: OutOfMemoryError exception processing large XML files
           Product: Fop
           Version: 0.20.5
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: pdf renderer
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Problem: I get an OUT OF MEMORY exception (without stack trace), while 
processing large XML files:
        Exception in thread "main" java.lang.OutOfMemoryError

I've tried with a 100 node XML file (784 Kb) and it worked.
I've tried with a 150 node XML file (1.176 KB) and it crashed at [INFO] [82].

It seems that there's some sort of limit to 1 MB...
I've monitored the mem usage on the Task Manager and it was using 
approximatively 80 MB RAM + 80 MB Virtual Memory
(I've only 256 MB ram on the computer I'm testing, but I've tried on a 512 MB 
ram computer too, with the same results).

Versions:
OS                      Windows2000 SP4 (build 2195)
FOP                     0.20.5 (and the libs distributed with that package)
j2sdk           1.4.1.02


This is a piece of the XML file:

        <Plichi>
                <Plico IDOrdine="65" Cliente="NRG" Campagna="Firenze" 
TargetDesc="Famiglie, Negozi, Uffici" IDPallet="5507" Canale="B" NrPlico="1" 
TotPlichi="68" NomeUdR="FIRENZE RECAPITO CAMPO DI MARTE" 
DataInizio="09/07/2003" DataFine="16/07/2003">
                        <Zone>
                                <Zona Cella="1" Nr="1" Sel="s"/>
                                <Zona Cella="2" Nr="2" Sel="s"/>
                                <Zona Cella="3" Nr="3" Sel="s"/>
                                <Zona Cella="4" Nr="4" Sel="s"/>
                                <Zona Cella="5" Nr="5" Sel="s"/>
                                <Zona Cella="6" Nr="6" Sel="s"/>
                                <Zona Cella="7" Nr="7" Sel="s"/>
                                <Zona Cella="8" Nr="8" Sel="s"/>
                                <Zona Cella="9" Nr="9" Sel="s"/>
                                <Zona Cella="10" Nr="10" Sel="s"/>
                                <Zona Cella="11" Nr="11" Sel="s"/>
                                <Zona Cella="12" Nr="12" Sel="s"/>
                                <Zona Cella="13" Nr="13" Sel="s"/>
                                <Zona Cella="14" Nr="14" Sel="n"/>
                                <Zona Cella="15" Nr="15" Sel="s"/>
                                <Zona Cella="16" Nr="16" Sel="s"/>
                                <Zona Cella="17" Nr="17" Sel="n"/>
                                <Zona Cella="18" Nr="18" Sel="s"/>
                                <Zona Cella="19" Nr="19" Sel="s"/>
                                <Zona Cella="20" Nr="20" Sel="n"/>
                                <Zona Cella="21" Nr="21" Sel="n"/>
                                <Zona Cella="22" Nr="22" Sel="s"/>
                                <Zona Cella="23" Nr="23" Sel="s"/>
                                <Zona Cella="24" Nr="24" Sel="s"/>
                                <Zona Cella="25" Nr="25" Sel="s"/>
                                <Zona Cella="26" Nr="26" Sel="s"/>
                                <Zona Cella="27" Nr="27" Sel="n"/>
                                <Zona Cella="28" Nr="28" Sel="s"/>
                                <Zona Cella="29" Nr="29" Sel="s"/>
                                <Zona Cella="30" Nr="30" Sel="s"/>
                                <Zona Cella="31" Nr="31" Sel="s"/>
                                <Zona Cella="32" Nr="32" Sel="s"/>
                                <Zona Cella="33" Nr="33" Sel="s"/>
                                <Zona Cella="34" Nr="34" Sel="s"/>
                                <Zona Cella="35" Nr="35" Sel="s"/>
                                <Zona Cella="36" Nr="36" Sel="s"/>
                                <Zona Cella="37" Nr="37" Sel="s"/>
                                <Zona Cella="38" Nr="38" Sel="s"/>
                                <Zona Cella="39" Nr="39" Sel="s"/>
                                <Zona Cella="40" Nr="40" Sel="s"/>
                                <Zona Cella="41" Nr="41" Sel="s"/>
                                <Zona Cella="42" Nr="42" Sel="s"/>
                                <Zona Cella="43" Nr="43" Sel="s"/>
                                <Zona Cella="44" Nr="44" Sel="s"/>
                                <Zona Cella="45" Nr="45" Sel="s"/>
                                <Zona Cella="46" Nr="46" Sel="s"/>
                                <Zona Cella="47" Nr="47" Sel="s"/>
                                <Zona Cella="48" Nr="48" Sel="s"/>
                                <Zona Cella="49" Nr="49" Sel="s"/>
                                <Zona Cella="50" Nr="50" Sel="s"/>
                                <Zona Cella="51" Nr="51" Sel="s"/>
                                <Zona Cella="52" Nr="52" Sel="s"/>
                                <Zona Cella="53" Nr="53" Sel="n"/>
                                <Zona Cella="54" Nr="54" Sel="s"/>
                                <Zona Cella="55" Nr="55" Sel="s"/>
                                <Zona Cella="56" Nr="56" Sel="n"/>
                                <Zona Cella="57" Nr="57" Sel="s"/>
                                <Zona Cella="58" Nr="58" Sel="n"/>
                                <Zona Cella="59" Nr="59" Sel="s"/>
                                <Zona Cella="60" Nr="60" Sel="n"/>
                                <Zona Cella="61" Nr="61" Sel="s"/>
                                <Zona Cella="62" Nr="62" Sel="s"/>
                                <Zona Cella="63" Nr="63" Sel="n"/>
                                <Zona Cella="64" Nr="64" Sel="s"/>
                                <Zona Cella="65" Nr="0" Sel="n"/>
                                <Zona Cella="66" Nr="0" Sel="n"/>
                                <Zona Cella="67" Nr="0" Sel="n"/>
                                <Zona Cella="68" Nr="0" Sel="n"/>
                                <Zona Cella="69" Nr="0" Sel="n"/>
                                <Zona Cella="70" Nr="0" Sel="n"/>
                                <Zona Cella="71" Nr="0" Sel="n"/>
                                <Zona Cella="72" Nr="0" Sel="n"/>
                                <Zona Cella="73" Nr="0" Sel="n"/>
                                <Zona Cella="74" Nr="0" Sel="n"/>
                                <Zona Cella="75" Nr="0" Sel="n"/>
                                <Zona Cella="76" Nr="0" Sel="n"/>
                                <Zona Cella="77" Nr="0" Sel="n"/>
                                <Zona Cella="78" Nr="0" Sel="n"/>
                                <Zona Cella="79" Nr="0" Sel="n"/>
                                <Zona Cella="80" Nr="0" Sel="n"/>
                                <Zona Cella="81" Nr="0" Sel="n"/>
                                <Zona Cella="82" Nr="0" Sel="n"/>
                                <Zona Cella="83" Nr="0" Sel="n"/>
                                <Zona Cella="84" Nr="0" Sel="n"/>
                                <Zona Cella="85" Nr="0" Sel="n"/>
                                <Zona Cella="86" Nr="0" Sel="n"/>
                                <Zona Cella="87" Nr="0" Sel="n"/>
                                <Zona Cella="88" Nr="0" Sel="n"/>
                                <Zona Cella="89" Nr="0" Sel="n"/>
                                <Zona Cella="90" Nr="0" Sel="n"/>
                                <Zona Cella="91" Nr="0" Sel="n"/>
                                <Zona Cella="92" Nr="0" Sel="n"/>
                                <Zona Cella="93" Nr="0" Sel="n"/>
                                <Zona Cella="94" Nr="0" Sel="n"/>
                                <Zona Cella="95" Nr="0" Sel="n"/>
                                <Zona Cella="96" Nr="0" Sel="n"/>
                                <Zona Cella="97" Nr="0" Sel="n"/>
                                <Zona Cella="98" Nr="0" Sel="n"/>
                                <Zona Cella="99" Nr="0" Sel="n"/>
                                <Zona Cella="100" Nr="0" Sel="n"/>
                                <Zona Cella="101" Nr="0" Sel="n"/>
                                <Zona Cella="102" Nr="0" Sel="n"/>
                                <Zona Cella="103" Nr="0" Sel="n"/>
                                <Zona Cella="104" Nr="0" Sel="n"/>
                                <Zona Cella="105" Nr="0" Sel="n"/>
                                <Zona Cella="106" Nr="0" Sel="n"/>
                                <Zona Cella="107" Nr="0" Sel="n"/>
                                <Zona Cella="108" Nr="0" Sel="n"/>
                                <Zona Cella="109" Nr="0" Sel="n"/>
                                <Zona Cella="110" Nr="0" Sel="n"/>
                                <Zona Cella="111" Nr="0" Sel="n"/>
                                <Zona Cella="112" Nr="0" Sel="n"/>
                                <Zona Cella="113" Nr="0" Sel="n"/>
                                <Zona Cella="114" Nr="0" Sel="n"/>
                                <Zona Cella="115" Nr="0" Sel="n"/>
                                <Zona Cella="116" Nr="0" Sel="n"/>
                                <Zona Cella="117" Nr="0" Sel="n"/>
                                <Zona Cella="118" Nr="0" Sel="n"/>
                                <Zona Cella="119" Nr="0" Sel="n"/>
                                <Zona Cella="120" Nr="0" Sel="n"/>
                                <Zona Cella="121" Nr="0" Sel="n"/>
                                <Zona Cella="122" Nr="0" Sel="n"/>
                                <Zona Cella="123" Nr="0" Sel="n"/>
                                <Zona Cella="124" Nr="0" Sel="n"/>
                                <Zona Cella="125" Nr="0" Sel="n"/>
                                <Zona Cella="126" Nr="0" Sel="n"/>
                                <Zona Cella="127" Nr="0" Sel="n"/>
                                <Zona Cella="128" Nr="0" Sel="n"/>
                                <Zona Cella="129" Nr="0" Sel="n"/>
                                <Zona Cella="130" Nr="0" Sel="n"/>
                                <Zona Cella="131" Nr="0" Sel="n"/>
                                <Zona Cella="132" Nr="0" Sel="n"/>
                                <Zona Cella="133" Nr="0" Sel="n"/>
                                <Zona Cella="134" Nr="0" Sel="n"/>
                                <Zona Cella="135" Nr="0" Sel="n"/>
                                <Zona Cella="136" Nr="0" Sel="n"/>
                                <Zona Cella="137" Nr="0" Sel="n"/>
                                <Zona Cella="138" Nr="0" Sel="n"/>
                                <Zona Cella="139" Nr="0" Sel="n"/>
                                <Zona Cella="140" Nr="0" Sel="n"/>
                                <Zona Cella="141" Nr="0" Sel="n"/>
                                <Zona Cella="142" Nr="0" Sel="n"/>
                                <Zona Cella="143" Nr="0" Sel="n"/>
                                <Zona Cella="144" Nr="0" Sel="n"/>
                                <Zona Cella="145" Nr="0" Sel="n"/>
                                <Zona Cella="146" Nr="0" Sel="n"/>
                                <Zona Cella="147" Nr="0" Sel="n"/>
                                <Zona Cella="148" Nr="0" Sel="n"/>
                                <Zona Cella="149" Nr="0" Sel="n"/>
                                <Zona Cella="150" Nr="0" Sel="n"/>
                                <Zona Cella="151" Nr="0" Sel="n"/>
                                <Zona Cella="152" Nr="0" Sel="n"/>
                                <Zona Cella="153" Nr="0" Sel="n"/>
                                <Zona Cella="154" Nr="0" Sel="n"/>
                                <Zona Cella="155" Nr="0" Sel="n"/>
                                <Zona Cella="156" Nr="0" Sel="n"/>
                                <Zona Cella="157" Nr="0" Sel="n"/>
                                <Zona Cella="158" Nr="0" Sel="n"/>
                                <Zona Cella="159" Nr="0" Sel="n"/>
                                <Zona Cella="160" Nr="0" Sel="n"/>
                                <Zona Cella="161" Nr="0" Sel="n"/>
                                <Zona Cella="162" Nr="0" Sel="n"/>
                                <Zona Cella="163" Nr="0" Sel="n"/>
                                <Zona Cella="164" Nr="0" Sel="n"/>
                                <Zona Cella="165" Nr="0" Sel="n"/>
                                <Zona Cella="166" Nr="0" Sel="n"/>
                                <Zona Cella="167" Nr="0" Sel="n"/>
                                <Zona Cella="168" Nr="0" Sel="n"/>
                                <Zona Cella="169" Nr="0" Sel="n"/>
                                <Zona Cella="170" Nr="0" Sel="n"/>
                                <Zona Cella="171" Nr="0" Sel="n"/>
                                <Zona Cella="172" Nr="0" Sel="n"/>
                                <Zona Cella="173" Nr="0" Sel="n"/>
                                <Zona Cella="174" Nr="0" Sel="n"/>
                                <Zona Cella="175" Nr="0" Sel="n"/>
                                <Zona Cella="176" Nr="0" Sel="n"/>
                                <Zona Cella="177" Nr="0" Sel="n"/>
                                <Zona Cella="178" Nr="0" Sel="n"/>
                                <Zona Cella="179" Nr="0" Sel="n"/>
                                <Zona Cella="180" Nr="0" Sel="n"/>
                                <Zona Cella="181" Nr="0" Sel="n"/>
                                <Zona Cella="182" Nr="0" Sel="n"/>
                                <Zona Cella="183" Nr="0" Sel="n"/>
                                <Zona Cella="184" Nr="0" Sel="n"/>
                                <Zona Cella="185" Nr="0" Sel="n"/>
                                <Zona Cella="186" Nr="0" Sel="n"/>
                                <Zona Cella="187" Nr="0" Sel="n"/>
                                <Zona Cella="188" Nr="0" Sel="n"/>
                                <Zona Cella="189" Nr="0" Sel="n"/>
                                <Zona Cella="190" Nr="0" Sel="n"/>
                                <Zona Cella="191" Nr="0" Sel="n"/>
                                <Zona Cella="192" Nr="0" Sel="n"/>
                                <Zona Cella="193" Nr="0" Sel="n"/>
                                <Zona Cella="194" Nr="0" Sel="n"/>
                                <Zona Cella="195" Nr="0" Sel="n"/>
                                <Zona Cella="196" Nr="0" Sel="n"/>
                                <Zona Cella="197" Nr="0" Sel="n"/>
                                <Zona Cella="198" Nr="0" Sel="n"/>
                                <Zona Cella="199" Nr="0" Sel="n"/>
                                <Zona Cella="200" Nr="0" Sel="n"/>
                        </Zone>
                </Plico>
                ...
        </Plichi>

The <Plichi> tag can be repeated up to 200000 times!

This is the XSL file:

        <?xml version="1.0"?>
        <xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:fo="http://www.w3.org/1999/XSL/Format";>
                <xsl:output indent="yes"/>
                <xsl:decimal-format decimal-separator="," grouping-
separator="." NaN="-"/>
                <xsl:template match="/">
                        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
                                <!-- Struttura della paginazione -->
                                <fo:layout-master-set>
                                        <fo:simple-page-master master-
name="EtichettaPlico-A5" page-width="210mm" page-height="148mm" margin-
top="12mm" margin-bottom="12mm"
                                        margin-left="15mm" margin-right="15mm">
                                                <fo:region-body/>
                                        </fo:simple-page-master>
                                        <fo:page-sequence-master master-
name="PageLayout">
                                                <fo:repeatable-page-master-
reference master-name="EtichettaPlico-A5"/>
                                        </fo:page-sequence-master>
                                </fo:layout-master-set>
                                <fo:page-sequence master-name="PageLayout" 
master-reference="EtichettaPlico-A5">
                                        <!-- Struttura della pagina -->
                                        <fo:flow flow-name="xsl-region-body">
                                                <!-- Etichetta Plico-->
                                                <fo:block>
                                                        <fo:table>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-
column column-width="4.5mm"/>
                                                                <fo:table-body>
                                                                
        <xsl:apply-templates select="Plichi/Plico"/>
                                                                </fo:table-body>
                                                        </fo:table>
                                                </fo:block>
                                        </fo:flow>
                                </fo:page-sequence>
                        </fo:root>
                </xsl:template>

                <xsl:template match="Plichi/Plico">
                        <fo:table-row height="50pt">
                                <!-- Codice a Barre -->
                                <fo:table-cell number-columns-spanned="12" 
border-start-style="solid" border-end-style="solid" border-before-style="solid" 
border-after-style="solid">
                                        <fo:block height="15mm" text-
align="center" font-size="30pt" font-family="IDAutomationSC128M" space-
before.minimum="1mm"
                                        space-before.optimum="1mm"
                                        space-before.conditionality="retain" 
space-before.precedence="force"
                                        space-after.minimum="1mm" space-
after.optimum="1mm" space-after.conditionality="retain" space-
after.precedence="force"
                                        padding-start="-15mm" padding-
start.conditionality="retain" padding-end="-15mm" padding-
end.conditionality="retain">
                                                <xsl:value-of select="@BC"/>
                                        </fo:block>
                                        <fo:block text-align="center" font-
size="10pt"><xsl:value-of select="@IDPallet"/></fo:block>
                                </fo:table-cell>
                                <!-- Cliente e Target -->
                                <fo:table-cell number-columns-spanned="28" 
border-end-style="solid" border-before-style="solid" border-after-style="solid">
                                        <fo:block text-align="center" font-
size="10pt" space-before.minimum="1mm" space-before.optimum="1mm" space-
before.conditionality="retain"                          space-
before.precedence="force">Cliente: <fo:block font-size="20pt" font-
weight="bold">
                                                        <xsl:value-of 
select="@Cliente"/>
                                                </fo:block>
                                        </fo:block>
                                        <fo:block text-align="center" font-
size="10pt" space-before.minimum="1mm" space-before.optimum="1mm" space-
before.conditionality="retain"                          space-
before.precedence="force">Target: <fo:block font-size="20pt" font-weight="bold">
                                                        <xsl:value-of 
select="@TargetDesc"/>
                                                </fo:block>
                                        </fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                        <!-- Riga vuota -->
                        <fo:table-row height="10pt">
                                <fo:table-cell number-columns-spanned="40"/>
                        </fo:table-row>
                        <fo:table-row height="35pt">
                                <!-- ID Ordine -->
                                <fo:table-cell number-columns-spanned="12" 
border-start-style="solid" border-end-style="solid" border-before-style="solid" 
border-after-style="solid">
                                        <fo:block text-align="center" font-
size="10pt" space-before.minimum="1mm" space-before.optimum="1mm" space-
before.conditionality="retain"                          space-
before.precedence="force">Numero Ordine: <fo:block font-size="16pt" font-
weight="bold">
                                                        <xsl:value-of 
select="@IDOrdine"/>
                                                </fo:block>
                                        </fo:block>
                                </fo:table-cell>
                                <!-- Nome campagna -->
                                <fo:table-cell number-columns-spanned="28" 
border-start-style="solid" border-end-style="solid" border-before-style="solid" 
border-after-style="solid">
                                        <fo:block text-align="center" font-
size="10pt" space-before.minimum="1mm" space-before.optimum="1mm" space-
before.conditionality="retain"                          space-
before.precedence="force">Campagna: <fo:block font-size="16pt" font-
weight="bold">
                                                        <xsl:value-of 
select="@Campagna"/>
                                                </fo:block>
                                        </fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                        <!-- Riga per la nota -->
                        <fo:table-row height="10pt">
                                <fo:table-cell number-columns-spanned="40" 
border-start-style="solid" border-end-style="solid" border-after-style="solid">
                                        <fo:block text-align="center" font-
size="10pt" space-before.minimum="1mm" space-before.optimum="1mm" space-
before.conditionality="retain"                          space-
before.precedence="force">DA DISTRIBUIRE NELLE ZONE PORTALETTERE INDICATE:
                                        </fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                        <!-- Prima riga della griglia delle zone -->
                        <fo:table-row height="6pt" border-start-style="solid">
                                <xsl:call-template name="CreaCelle">
                                        <xsl:with-param name="Start" 
select="0"/>
                                        <xsl:with-param name="End" select="40"/>
                                </xsl:call-template>
                        </fo:table-row>
                        <!-- Seconda riga della griglia delle zone -->
                        <fo:table-row height="6pt" border-start-style="solid">
                                <xsl:call-template name="CreaCelle">
                                        <xsl:with-param name="Start" 
select="40"/>
                                        <xsl:with-param name="End" select="80"/>
                                </xsl:call-template>
                        </fo:table-row>
                        <!-- Terza riga della griglia delle zone -->
                        <fo:table-row height="6pt" border-start-style="solid">
                                <xsl:call-template name="CreaCelle">
                                        <xsl:with-param name="Start" 
select="80"/>
                                        <xsl:with-param name="End" 
select="120"/>
                                </xsl:call-template>
                        </fo:table-row>
                        <!-- Quarta riga della griglia delle zone -->
                        <fo:table-row height="6pt" border-start-style="solid">
                                <xsl:call-template name="CreaCelle">
                                        <xsl:with-param name="Start" 
select="120"/>
                                        <xsl:with-param name="End" 
select="160"/>
                                </xsl:call-template>
                        </fo:table-row>
                        <!-- Quinta riga della griglia delle zone -->
                        <fo:table-row height="6pt" border-start-style="solid">
                                <xsl:call-template name="CreaCelle">
                                        <xsl:with-param name="Start" 
select="160"/>
                                        <xsl:with-param name="End" 
select="200"/>
                                </xsl:call-template>
                        </fo:table-row>
                        <!-- Riga vuota -->
                        <fo:table-row height="10pt">
                                <fo:table-cell number-columns-spanned="40"/>
                        </fo:table-row>
                        <!-- Periodo per il recapito -->
                        <fo:table-row height="22pt">
                                <fo:table-cell number-columns-spanned="14" 
border-start-style="solid" border-before-style="solid" border-after-
style="solid">
                                        <fo:block text-align="right" font-
size="10pt" space-before.minimum="2mm" space-before.optimum="2mm"
                                        space-before.conditionality="retain" 
space-before.precedence="force">Da recapitare dal
                                        </fo:block>
                                </fo:table-cell>
                                <fo:table-cell number-columns-spanned="8" 
border-before-style="solid" border-after-style="solid">
                                        <fo:block text-align="center" font-
size="16pt" font-weight="bold" space-before.minimum="1mm" space-
before.optimum="1mm"
                                        space-before.conditionality="retain" 
space-before.precedence="force">
                                                <xsl:value-of 
select="@DataInizio"/>
                                        </fo:block>
                                </fo:table-cell>
                                <fo:table-cell number-columns-spanned="2" 
border-before-style="solid" border-after-style="solid">
                                        <fo:block text-align="center" font-
size="10pt" space-before.minimum="2mm" space-before.optimum="2mm"
                                        space-before.conditionality="retain" 
space-before.precedence="force"> al
                                        </fo:block>
                                </fo:table-cell>
                                <fo:table-cell number-columns-spanned="16" 
border-end-style="solid" border-before-style="solid" border-after-style="solid">
                                        <fo:block text-align="left" font-
size="16pt" font-weight="bold" space-before.minimum="1mm" space-
before.optimum="1mm"
                                        space-before.conditionality="retain" 
space-before.precedence="force">
                                                <xsl:value-of 
select="@DataFine"/>
                                        </fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                        <!-- Numerazione plico -->
                        <fo:table-row height="22pt">
                                <fo:table-cell number-columns-spanned="10" 
border-start-style="solid" border-before-style="solid" border-after-
style="solid">
                                        <fo:block text-align="right" font-
size="10pt" space-before.minimum="2mm" space-before.optimum="2mm"
                                        space-before.conditionality="retain" 
space-before.precedence="force">Numero Plico:
                                        </fo:block>
                                </fo:table-cell>
                                <fo:table-cell number-columns-spanned="10" 
border-before-style="solid" border-after-style="solid">
                                        <fo:block text-align="left" font-
size="16pt" font-weight="bold" space-before.minimum="1mm" space-
before.optimum="1mm"
                                        space-before.conditionality="retain" 
space-before.precedence="force">
                                                <xsl:value-of 
select="@NrPlico"/>
                                        </fo:block>
                                </fo:table-cell>
                                <fo:table-cell number-columns-spanned="10" 
border-start-style="solid" border-before-style="solid" border-after-
style="solid">
                                        <fo:block text-align="right" font-
size="10pt" space-before.minimum="2mm" space-before.optimum="2mm"
                                        space-before.conditionality="retain" 
space-before.precedence="force">Totale Plichi:
                                        </fo:block>
                                </fo:table-cell>
                                <fo:table-cell number-columns-spanned="10" 
border-end-style="solid" border-before-style="solid" border-after-style="solid">
                                        <fo:block text-align="left" font-
size="16pt" font-weight="bold" space-before.minimum="1mm" space-
before.optimum="1mm"
                                        space-before.conditionality="retain" 
space-before.precedence="force">
                                                <xsl:value-of 
select="@TotPlichi"/>
                                        </fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                        <!-- Riga vuota -->
                        <fo:table-row height="10pt">
                                <fo:table-cell number-columns-spanned="40"/>
                        </fo:table-row>
                        <!-- Ufficio di recapito -->
                        <fo:table-row height="35pt">
                                <fo:table-cell number-columns-spanned="40" 
border-start-style="solid" border-end-style="solid" border-before-style="solid" 
border-after-style="solid">
                                        <fo:block text-align="center" font-
size="10pt" space-before.minimum="1mm" space-before.optimum="1mm" space-
before.conditionality="retain"                          space-
before.precedence="force">Ufficio di Recapito:
                                                <fo:block font-size="16pt" font-
weight="bold">
                                                        <xsl:value-of 
select="@NomeUdR"/>
                                                </fo:block>
                                        </fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row height="50pt">
                                <!-- Canale -->
                                <fo:table-cell number-columns-spanned="28" 
border-start-style="solid" border-end-style="solid" border-before-style="solid" 
border-after-style="solid">
                                        <fo:block text-align="center" font-
size="25pt" font-weight="bold" space-before.minimum="5mm" space-
before.optimum="5mm"
                                        space-before.conditionality="retain" 
space-before.precedence="force">PromoPosta - Canale"<xsl:value-of 
select="@Canale"/>"
                                        </fo:block>
                                </fo:table-cell>
                                <!-- Codice a barre -->
                                <fo:table-cell number-columns-spanned="12" 
border-end-style="solid" border-before-style="solid" border-after-style="solid">
                                        <fo:block height="15mm" text-
align="center" font-size="30pt" font-family="IDAutomationSC128M" space-
before.minimum="1mm"
                                        space-before.optimum="1mm" space-
before.conditionality="retain" space-before.precedence="force"
                                        space-after.minimum="1mm" space-
after.optimum="1mm" space-after.conditionality="retain" space-
after.precedence="force"
                                        padding-start="-15mm" padding-
start.conditionality="retain" padding-end="-15mm" padding-
end.conditionality="retain">
                                                <xsl:value-of select="@BC"/>
                                        </fo:block>
                                        <fo:block text-align="center" font-
size="10pt"><xsl:value-of select="@IDPallet"/></fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                        <!-- Nota per i dettagli -->
                        <fo:table-row height="10pt">
                                <fo:table-cell number-columns-spanned="40">
                                        <fo:block font-size="10pt" space-
before.minimum="1mm" space-before.optimum="1mm" space-
before.conditionality="retain"
                                                space-
before.precedence="force">NOTA: per i dettagli sulla campagna, consultare 
l'apposito report sul sito divisionale.</fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                        <!-- Pagina a capo-->
                        <fo:table-row break-after="page">
                        </fo:table-row>
                </xsl:template>

                <!-- Template per la creazione di una riga di celle per la 
griglia delle zone -->
                <xsl:template name="CreaCelle">
                        <xsl:param name="Start">0</xsl:param>
                        <xsl:param name="End">40</xsl:param>
                        <xsl:for-each select="Zone/[EMAIL PROTECTED] &gt; $Start and 
@Cella &lt;= $End]">
                                <fo:table-cell height="3mm" border-start-
style="solid" border-end-style="solid" border-after-style="solid">
                                        <xsl:choose>
                                                <xsl:when test="@Nr='0'">
                                                </xsl:when>
                                                <xsl:otherwise>
                                                        <xsl:choose>
                                                                <xsl:when 
test="@Sel='s'">
                                                                
        <fo:block padding-start="-1pt" padding-start.conditionality="retain" 
space-before="1pt" space-before.conditionality="retain"
                                                                        text-
align="center" font-size="6pt" background-color="rgb(190,190,190)">
                                                                        
        <xsl:value-of select="@Nr"/>
                                                                
        </fo:block>
                                                                </xsl:when>
                                                                <xsl:otherwise>
                                                                
        <fo:block text-align="center" font-size="6pt" space-
before.minimum="0.5mm" space-before.optimum="0.5mm"
                                                                        
        space-before.conditionality="retain" space-before.precedence="force">
                                                                                
        <xsl:value-of select="@Nr"/>
                                                                
        </fo:block>
                                                                </xsl:otherwise>
                                                        </xsl:choose>
                                                </xsl:otherwise>
                                        </xsl:choose>
                                </fo:table-cell>
                        </xsl:for-each>
                </xsl:template>
        </xsl:stylesheet>

For the conversion I'm using the ExampleXML2PDF.java code that I've got from 
your site.
I've just added this couple of row to enable theconfig file in the 
convertXML2PDF class, just below the Driver variable declaration:

        //Sets configuration file
        File userConfigFile = new File("fop-0.20.5\\conf\\configTest.xml");
        Options options = new Options(userConfigFile);

and this is the config file:

        <!--<!DOCTYPE configuration SYSTEM "config.dtd">-->
        <!-- to developers: have a look at the config.dtd to
             see how to structure your config entries -->
        <configuration>
                <entry>
                        <key>version</key>
                        <value>FOP @version@</value>
                </entry>
        
                <!-- default values for commandline options -->
                <!-- suppress all progress information, error message are still 
displayed -->
                <entry>
                        <key>quiet</key>
                        <value>false</value>
                </entry>
                <!-- sets debug mode on/off; debug mode hasm more progress
                 information and a stacktrace in case of a fatal exception -->
                <entry>
                        <key>debugMode</key>
                        <value>false</value>
                </entry>
                <!-- displays all configuration  settings and then exits -->
                <entry>
                        <key>dumpConfiguration</key>
                        <value>false</value>
                </entry>
        
                <!-- stream-filter-list provides the default filters that are 
applied to all
                stream objects within the PDF file. These are normally used for
                compression -->
                <entry role="pdf">
                    <key>stream-filter-list</key>
                    <list>
                      <!-- provides compression using zlib flate (default is 
on)-->
                      <value>flate</value>
        
                      <!-- encodes binary data into printable ascii characters 
(default off)
                           This provides about a 4:5 expansion of data size -->
                      <value>ascii-85</value>
        
                      <!-- encodes binary data with hex representation (default 
off)
                           This filter is not recommended as it doubles the 
data size -->
                      <!-- <value>ascii-hex</value> -->
                </list>
                </entry>
                <fonts>
                        <font metrics-file=".\IDAutomationSC128M.xml" 
kerning="yes"
                                embed-
file="C:\WINNT\Fonts\IDAutomationSC128M.ttf">
                                <font-triplet name="IDAutomationSC128M" 
style="normal" weight="normal"/>
                        </font>
                </fonts>
         </configuration>

I've just added the entry for the barcode font, but that's not the problem.
I get the exception even without the additional font at the same point ([INFO] 
[82]).

This is the batch I use to compile and run the class:

        @echo off

        echo Build and Launch ExampleXML2PDF.java
        echo ----------------

        if "%JAVA_HOME%" == "" goto error
        SET PATH=%PATH%;%JAVA_HOME%\Bin

        set LIBDIR=.\fop-0.20.5\lib
        set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip
        set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\ant-1.5.1.jar
        set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar
        set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl.jar
        set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.4.1.jar
        set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-cvs-
20020806.jar
        set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\fop.jar

        echo Building with classpath %LOCALCLASSPATH%

        %JAVA_HOME%\bin\javac.exe -g -classpath "%LOCALCLASSPATH%" -d CLASS 
ExampleXML2PDF.java

        echo Launching ExampleXML2PDF.java

        set LOCALCLASSPATH=%LOCALCLASSPATH%;.\CLASS

        %JAVA_HOME%\bin\java.exe -classpath "%LOCALCLASSPATH%" 
embedding.ExampleXML2PDF

        goto end

        :error

        echo ERROR: JAVA_HOME not found in your environment.
        echo Please, set the JAVA_HOME variable in your environment to match the
        echo location of the Java Virtual Machine you want to use.

        :end

        rem set LOCALCLASSPATH=

        Pause
        
I hope I've included all the info you need to solve the problem as I could have 
XML file tens of MB big!!

Reply via email to