xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Louis.Mast...@log-net.com
Subject Re: java.lang.OutOfMemoryError processing fairly large table to PDF
Date Tue, 07 Feb 2006 14:02:27 GMT
Nige:

I can get 8 pages of your PO to render into PDF (around 900 rows I think), 
but only by increasing my JVM memory to a 400M.  It may be lower, but 400 
is all I tested.

My env is as follows:

FOP 0.20.3
JDK 1.4.1
Win2K
Command line:  java -Xmx400M org.apache.fop.apps.Fop -fo nigehelp.fo -pdf 
nigehelp.pdf

I can send you the PDF if you want?

-Lou

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LOG-NET, Inc.
The Logistics Network Management System
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230 Half Mile Road
Third Floor
Red Bank, NJ 07701
PH: 732-758-6800
FAX: 732-747-7497
http://www.LOG-NET.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIDENTIAL & PRIVILEGED
Unless otherwise indicated or if obvious from the nature of the content, 
the information contained herein is privileged and confidential 
information/work product. The communication is intended for the use of the 
individual or entity named above.  If the reader of this transmission is 
not the intended recipient, you are  hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please 
notify the sender immediately by telephone (732-758-6800) or by electronic 
mail (postmaster@LOG-NET.com), and destroy any copies, electronic, paper 
or otherwise, which you may have of this communication.  Thank you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Nige White <nigelw@forward-comp.co.uk> wrote on 02/07/2006 07:54:23 AM:

> I have a FOP document which is being generated by an XML transformation 
> from CSV.
> 
> I have a SAX parser which reads CSV, and fires events to make it look 
> like an XML document. This is processed into FO XML by an XSL 
> transformation.
> 
> Now the particular data I have is test data, and is quite large with a 
> lot of columns (They're user selected, so I selected all available just 
> to squeeze out this kind of problem!). This means that the table is very 

> wide.
> 
> In order to fit it into A4, the XSL transformation does a bit of testing 

> on the width, first setting orientation to landscape, and then if it 
> still doesn't fit, it scales down the font it uses (It's coded to use 
> Arial) from 10 points to whatever's necessary. This case is unrealistic 
> because there are so many columns, it has to go down to a font size of 
> 2.48 points, *but it should still create the PDF* - you'd just have to 
> scale it up in Acrobat to read it!!!!
> 
> The problem is, that FOP is blowing up with an "Out of memory" 
exception.
> 
> I'm not asking it to process *that much* data. It should really be able 
> to process a table with 37 columns and 386 rows (including the header)!
> 
> Here is the FO with all the table rows except the header, and first line 

> of data removed. If you process that into PDF, it works OK.
> 
> The real data basically just goes on in the same vein the way data tends 

> to, so to test it, just copy the table data row, and paste it in 385 
> times. Why does it blow up, I'm not doing anything wrong am I? Not 
> creating forward references like "Page n of n"?
> 
> HEEEEEELLLPPP!
> 
> Thanks,
> 
> Nige
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>  <fo:layout-master-set>
>    <fo:simple-page-master master-name="repeating" margin-top="1cm" 
> margin-bottom="1cm" margin-left="1cm" margin-right="1cm" 
> page-width="29.7cm" page-height="21cm">
>      <fo:region-body margin-bottom="0.75cm" margin-top="1.25cm" 
> margin-left="0cm"/>
>      <fo:region-before extent="1.25cm"/>
>      <fo:region-after extent="0.75cm"/>
>    </fo:simple-page-master>
>    <fo:page-sequence-master master-name="repeating_pm">
>      <fo:repeatable-page-master-reference maximum-repeats="no-limit" 
> master-reference="repeating"/>
>      <fo:single-page-master-reference master-reference="repeating"/>
>    </fo:page-sequence-master>
>  </fo:layout-master-set>
>  <fo:page-sequence initial-page-number="1" 
master-reference="repeating_pm">
>    <fo:static-content flow-name="xsl-region-before">
>      <fo:block space-after="1mm" font-weight="bold" 
> text-decoration="underline" font-size="15pt" 
> text-align="center">Purchase Order Report</fo:block>
>      <fo:block space-after="5mm" font-weight="normal" font-size="10pt" 
> text-align="center">Generated by ForwardOffice on 07-Feb-2006</fo:block>
>    </fo:static-content>
>    <fo:static-content flow-name="xsl-region-after">
>      <fo:block line-height="14pt" font-family="sans-serif" 
> font-size="10pt" space-before="2.5mm" text-align="center">Page
>        <fo:page-number/>
>      </fo:block>
>    </fo:static-content>
>    <fo:flow flow-name="xsl-region-body">
>      <fo:block font-size="2.48pt">
>        <fo:table border-collapse="collapse" table-layout="fixed" 
> width="775.69pt">
>          <fo:table-column column-width="24.87pt"/>
>          <fo:table-column column-width="13.43pt"/>
>          <fo:table-column column-width="17.91pt"/>
>          <fo:table-column column-width="12.93pt"/>
>          <fo:table-column column-width="18.40pt"/>
>          <fo:table-column column-width="49.75pt"/>
>          <fo:table-column column-width="11.44pt"/>
>          <fo:table-column column-width="17.16pt"/>
>          <fo:table-column column-width="17.16pt"/>
>          <fo:table-column column-width="20.89pt"/>
>          <fo:table-column column-width="13.93pt"/>
>          <fo:table-column column-width="19.90pt"/>
>          <fo:table-column column-width="18.40pt"/>
>          <fo:table-column column-width="07.96pt"/>
>          <fo:table-column column-width="16.17pt"/>
>          <fo:table-column column-width="8.45pt"/>
>          <fo:table-column column-width="26.86pt"/>
>          <fo:table-column column-width="41.29pt"/>
>          <fo:table-column column-width="21.89pt"/>
>          <fo:table-column column-width="22.63pt"/>
>          <fo:table-column column-width="18.40pt"/>
>          <fo:table-column column-width="30.59pt"/>
>          <fo:table-column column-width="34.82pt"/>
>          <fo:table-column column-width="37.56pt"/>
>          <fo:table-column column-width="34.58pt"/>
>          <fo:table-column column-width="24.13pt"/>
>          <fo:table-column column-width="17.66pt"/>
>          <fo:table-column column-width="22.88pt"/>
>          <fo:table-column column-width="18.40pt"/>
>          <fo:table-column column-width="11.19pt"/>
>          <fo:table-column column-width="9.70pt"/>
>          <fo:table-column column-width="20.89pt"/>
>          <fo:table-column column-width="20.89pt"/>
>          <fo:table-column column-width="17.91pt"/>
>          <fo:table-column column-width="17.91pt"/>
>          <fo:table-column column-width="17.66pt"/>
>          <fo:table-column column-width="18.90pt"/>
>          <fo:table-header background-color="#A3C9F1">
>            <fo:table-row>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Order 
> Number</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Delivery</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Issue 
> Date</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Currency</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Order 
> Value</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Supplier 

> Name</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Country</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Freight 
> Cost</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Other 
> Costs</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Demurrage/Ren</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">GOH 
> Sets</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Carton 
> Type</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Gross 
> Weight</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">POL</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Volume 
> m3</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">POD</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Vessel/Flight</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Carrier 
> Name</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">B/Lading/MAWB</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Consignment Ref</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Entry 
> Number</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Place of 

> Delivery</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Product 
> Code</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Product 
> Short Name</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Class 
> Description</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Colour</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Cost Per 

> Unit</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Commodity Code</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Total 
> Value</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Cartons</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Units</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Range/Look</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Style</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Ex-Factory</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">ETA 
> UK</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" 
> font-weight="bold">Cleared</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="center" font-weight="bold">Proof 
> Delivery</fo:block>
>              </fo:table-cell>
>            </fo:table-row>
>          </fo:table-header>
>          <fo:table-body>
>            <fo:table-row background-color="#E2ECF8">
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" 
margin-left="4pt">1</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" 
margin-left="4pt">2</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="right" 
> margin-left="4pt">01-Jul-2004</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="right" 
> margin-right="4pt">0.00</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="right" 
> margin-right="4pt">0.00</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="right" 
> margin-right="4pt">0.00</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="right" 
> margin-right="4pt">0.00</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="right" 
margin-right="4pt">0</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="right" 
> margin-right="4pt">0.00</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="right" 
> margin-right="4pt">0.00</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="right" 
> margin-right="4pt">0.00</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="right" 
> margin-right="4pt">0.00</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="right" 
margin-right="4pt">0</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="right" 
margin-right="4pt">0</fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"/>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"></fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"></fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"></fo:block>
>              </fo:table-cell>
>              <fo:table-cell border="1pt solid lightgrey">
>                <fo:block text-align="left" margin-left="4pt"></fo:block>
>              </fo:table-cell>
>            </fo:table-row>
>          </fo:table-body>
>        </fo:table>
>      </fo:block>
>    </fo:flow>
>  </fo:page-sequence>
> </fo:root>
> 
> 
> _____________________________________________________________________
> This message has been checked for all known viruses. Virus scanning
> powered by Messagelabs http://www.messagelabs.com For more information
> e-mail : hostmaster@forward-comp.co.uk
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 

Mime
View raw message