I normally work with xsl-fo for transform xml files into pdf.
Usually I do it with small xml files.
Now I want to do it using a large XML file (5000 records)
I got the following error message
Exception in thread "main" java.lang.OutOfMemoryError
: Java heap space
I read on apache’s site that:
To avoid errors like this, you need to pass an extra parameter to the java
command used in the fop script. This can be accomplished by creating a
~/.foprc (which is sourced by the fop script) and adding the parameter to the
FOP_OPTS environment variable.
The fop script looks for a FOP_HOME environment variable to locate the FOP
class libraries. You can create this variable using the ~/.foprc file as well.
Create a ~/.foprc file using the following commands:
cat > ~/.foprc << "EOF"
Replace <RAM_Installed> with a number representing the amount of RAM installed
in your computer (in megabytes). An example would be FOP_OPTS="-Xmx768m". For
more information about memory issues running FOP, see
To include the fop script in your path, update your personal or system-wide
profile with the following:
However it takes very long time to process the information (about 2 hrs)
There is another way to solve this issue?
Any other recommendation, for example using another similar tool?
Thank you for your comments,