MATLAB: Pdf report generator error

java outofmemoryerror

I am trying to generate a simple pdf report, but get java OutOfMemoryError
>> d = Document('test', 'pdf');
>> append(d,'hello');
>> close(d)
Error using rptgen.utils.FOPProxy/newFOPImpl (line 238) Java exception occurred: java.lang.OutOfMemoryError: Java heap space
Error in rptgen.utils.FOPProxy/foToPDFImpl (line 191) fop = newFOPImpl(h, fopOutputStream, basePath, locale, extraFonts);
Error in rptgen.utils.FOPProxy.foToPDF (line 84) foToPDFImpl(h, foPath, pdfPath, locale, extraFonts, cleanupFonts);

Best Answer

I was looking into this and found the direct answer :
That fixed it for me.