Q: I sometimes get a “java heap space” error or see a red X instead of an image when running PDF Studio.  What does this mean?

A: When running intense processes in PDF Studio, you may get a “java heap space” exception or an image may not show up properly. This happens when PDF Studio is running out of memory.

How to increase memory in PDF Studio

Increasing PDF Studio memory in newer versions

If you’re using PDF Studio 11 64bit installer and above, we now have an option to allocate more memory in our Preferences screen. You can go to Edit -> Preferences -> Applications and look for Allocated Memory option. (Note: it is not possible to increase the memory allocation in the 32-bit installer as it is already set to the maximum allowed 1024MB)

By default, Allocated Memory option is set to 1024MB.

Allocated memory

Below are some maximum PDF Studio memory recommendations for 64-bit systems based on the amount of total memory available on your system. Make sure to leave enough memory for your operating system and for any other applications you are running.

  • System Memory 4GB – PDF Studio 2GB (2048)
  • System Memory 6GB – PDF Studio 3GB (3072)
  • System Memory 8GB – PDF Studio 4GB (4096)
  • System Memory 10GB – PDF Studio 5GB (5120)
  • System Memory 12GB – PDF Studio 6GB (6144)

Increasing PDF Studio memory in older versions

If you’re using PDF Studio 10 and below, you can follow the following instructions to allocate more memory:

By default:

– PDF Studio 10 and below are allocated 768MB of memory.

If your computer has more than 2GB of RAM, you can allocate more memory by following the steps below. Make sure you have enough memory available or your machine will start swapping and be unresponsive.

On Windows:

  1. Close / Exit PDF Studio
  2. Open the file called pdfstudio10.vmoptions located in PDF Studio installation directory: C:\Program Files\PDFStudio10 (Some Windows versions will require you to start Notepad as an administrator and open the file from there to be able to save it. If that does not work copy the file to your desktop, then edit the file, then copy it back to the installation folder)
  3. Change -Xmx768m with -Xmx1024m to increase the allocation to 1024MB, for instance
    1. NOTE: The memory is typically limited to 1024MB. If you installed using the 64-bit installer you are only limited by the amount of memory available on your system.
  4. Save the file
  5. Launch PDF Studio

On Mac:

  1. Close / Exit PDF Studio
  2. Open Finder
  3. Go to Applications
  4. Right Click or CTRL + Click on the PDF Studio 10 Application icon and select “Show Package Contents” in the menu
  5. Click on Contents
  6. Double-Click on Info.plist to open the file
    1. NOTE: if you used the installer for Mac OS X 10.8 and above you will need to open vmoptions.txt instead
    2. (Lion Only) In Lion, the file is locked by default. Click on “Locked” and change it to “Unlocked”. Open the Java “node” by clicking on the little arrow
  7. Change -Xmx768m with -Xmx1024m to increase the allocation to 1024MB, for instance
    1. NOTE: The memory is typically limited to 1024MB. If you installed using the installer for Mac OS X 10.8 and above you are only limited by the amount of memory available on your system.
  8. Save the file (On Lion, use File -> Save a Version to save the file)
  9. Launch PDF Studio

On Linux / Unix:

  1. Close / Exit PDF Studio
  2. Open the file called pdfstudio10.vmoptions located in PDF Studio installation directory. If this file does not exist, create an empty file with this name. 
  3. Change -Xmx768m with -Xmx1024m to increase the allocation to 1024MB, for instance
    1. NOTE: The memory is typically limited to 1024MB. If you installed using the 64-bit installer you are only limited by the amount of memory available on your system.
  4. Save the file
  5. Launch PDF Studio

Possible issues when increasing memory: 

Error: The JVM could not be started. The maximum heap size (-Xmx) might be too large

You may encounter this error when using one of PDF Studio 32 bits installers. The maximum heap size will usually range from 1.4G to 1.6G but it can go up to 4G. Read more about heap size limit with 32-bit JVM.

With PDF Studio 64 bits installers, the maximum heap size is basically nonexistent – other than the memory available on the machine of course –  as it is about the square of the memory that can be allocated in 32 bit.