Re: fop java.lang.OutOfMemoryError: Java heap space

Mark Giffin

Hi Apollo,

Looks like you need to define more memory for your PDF build. The -Xmx parameter defines it and you are only giving it a gigabyte with -Xmx1024. Try a larger amount like -Xmx3000 or even larger and see what happens.

PDF processing, with FOP and other FO processors, can take vast amounts of memory. I used to run a 4,400 page PDF that took 5 GB of RAM to run (using RenderX XEP).

Mark Giffin
Mark Giffin Consulting, Inc.

On 10/3/2018 1:40 PM, mecpoi5tttehxnc2wor5kzbcow5bbvi22hwxthwz@... [dita-users] wrote:


if I want to create a bigger project as PDF with fop I get the error message in the log:

build_fop.xml java.lang.OutOfMemoryError: Java heap space
Dita-Open-Toolkit\plugins\org.dita.pdf2.fop\build_fop.xml:158: java.lang.OutOfMemoryError: Java heap space

I am using DITA-OT 2.5.4 with Java version: 9 (jre-9.0.1) under Windows 10. I have 8 GByte RAM on my system.

The file from the Temp directory is only 4.979 KB in size. If I call this fo file directly via FOP, a PDF file is created. This has then 5,948 KB. So then everything should not be so wild.

In the startcmd.bat I have
set ANT_OPTS=-Xmx512m %ANT_OPTS%%
changed to
set ANT_OPTS=-Xmx1024m %ANT_OPTS% (if that has anything to do with it at all).

Does anyone have any idea what else I can try?

Thanks for your help



Join to automatically receive all group messages.