Main Content

Java Memory Usage

MATLAB® Report Generator™ uses Java heap memory to generate PDF documents. The default Java heap size that MATLAB allocates may not be enough to convert large PDF documents. The error that occurs if your report conversion runs out of Java heap memory is:

Document conversion failed. Java exception occurred: 

To generate your PDF document, increase the Java heap space to the maximum amount:

  1. Click Preferences on the MATLAB toolbar.

  2. Expand General

  3. To open the MATLAB General Java Heap memory Preferences panel, click Java Heap Memory

    The Java Heap size slider is positioned at 768 MB.

  4. Move the slider all the way to the right to set the Java Heap Size to the maximum value.

    The Java Heap Size slider is positioned at 2993 MB.

  5. To enable the new Java heap size, restart MATLAB.