Skip to main content

Is there a size limit for the PDF when using the 'PDF: Extract Image' action?
Whenever I try to use a PDF larger than 1MB, it throws a 'Java Heap Space Error.'
 

Type of image to be converted to: JPEG

JPEG Quality: 100

X and Y resolution (dpi) :200

I tried this with a 4.22MB PDF file, single page, 600 DPI scan of a photo. I was unable to replicate the error you reported.

Is this a PDF you can share? You can send it to my email at aaron.gleason@automationanywhere.com to see if I can replicate your results.


@Om Keskar 

You can increase java heap space with below two options 
 

Solution 1 :
Steps to follow : 

  1. Edit the “nodemanager.properties” file under “C:\Program Files\Automation Anywhere\Bot Agent\config” 
  2. Add this line to configure more heap memory  bot.launcher.jvm.options=-Xmx4096m  
  3. Restart the bot agent service.

Solution 2: 
Steps to follow :
1. Login with admin user in A360 Control Room.
2. Go to Administration > Settings > Devices > Advanced Options and click edit.
3. Add the below string under "Bot launcher JVM options" including double quotes :
"-Xmx8192m"


@Om Keskar Were you able to get this to work?


@Om Keskar Were you able to get this to work?

This solution didn’t work, but I found another one that worked for me.


Hi,

If you're facing a similar issue, you can try increasing the Java heap space using the Command Line Interface.

First, check the currently assigned memory with the following command:

java -XX:+PrintFlagsFinal | findstr "HeapSize"


To increase the heap size, use:

SETX _JAVA_OPTIONS "-Xmx2048m"

  • Use 1024 for 1GB

  • Use 2048 for 2GB

After making the change, run the first command again to verify that the new heap size has been applied. This should help resolve the issue.

In my case, I was unable to process PDFs larger than 1MB when the heap size was set to 512MB. After increasing it to 1024MB, I was able to process PDFs over 10MB without any problems.

Note: Avoid increasing the heap size too much, as it may negatively impact the performance of your system or bot.

Thanks,
Om.


Reply