This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Fwd: Re: [docbook-apps] FOP memory]


On Mon, 2005-02-07 at 19:08, Tristan Fiedler wrote:
> Hi All,
> 
> When including a specific (but not all) PNG format image to create PDF 
> output with FOP, I get :
> 
> Exception in thread "main" java.lang.OutOfMemoryError
> 
> (HTML conversion with saxon works fine).
> 
> I tried to search the docbook-apps archive at  
> http://docbook.sourceforge.net/dbk.searchform/
> but apparently the machine has crashed.
> 
> Any suggestions how to increase the FOP memory allocation
> 
> System : Mac OSX 10.3.7,
> Processor :  1.5 GHz PowerPC G4
> Memory : 1 GB DDR SDRAM
> 
> Command (the saxon call runs fine and generates the FO format file):
> 
> java com.icl.saxon.StyleSheet -x 
> org.apache.xml.resolver.tools.ResolvingXMLReader -y 
> org.apache.xml.resolver.tools.ResolvingXMLReader -r 
> org.apache.xml.resolver.tools.CatalogResolver -u -o temp_$number.fo 
> $file_in Style_PDF.xsl; java org.apache.fop.apps.Fop -fo 
> temp_$number.fo -pdf $file_out.pdf;

Memory for FoP can be problematic for large files. I assume you are
talking about Apache FoP 0.20.5 rather than the development stream.

You adjust memory through the Java Virtual Machine and the 
usual parameters for Sun SDK 1.5 are:

    -Xms<size>        set initial Java heap size
    -Xmx<size>        set maximum Java heap size
    -Xss<size>        set java thread stack size
 
where size can be 512M, for example.

You could start with -Xmx512M for example. 

Does Fop end with a memory exhausted exception ?

Remember that the current Java Memory Management is quite
sophisticated. Remember that you can always add memory. Fixing Fop
will take a lot longer. DDR memory costs a couple of hundred bucks
per Gigabyte. Memory MIGHT be a solution.

Fop prints out a count of pages completed and you should be able to
estimate how close you are getting to completing the file. 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]