pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tres Finocchiaro <tres.finocchi...@gmail.com>
Subject Re: Image size and dimensions question
Date Mon, 06 Mar 2017 23:20:43 GMT
>
> Does PDFBox have limitations on image size and dimentions? If so what are
> they? I can't seem to come across this information.


Assuming you're using Windows and the official Oracle JVM:

   - the 32-bit JVM, the max heapsize Java will allow without modification
   is 256 MB
   - the 64-bit JVM on the other hand is based on available memory.  On
   Windows 10 with 8GB of ram, this is about 1.9 GB max heap size.

Why do I mention this?  If your Java application is running in an
unadulterated environment (no custom -Xms or -Xmx launch flags, no custom
JAVA_OPTIONS environmental variable), the defaults are all you will get.

So image size should be directly proportional to memory size, right?

   - Partially.  Since garbage collection is not instantaneous, the limits
   can be reached even when dealing with a small image size if memory is used
   in quick succession.

In my experience, the best way to test for maximum image size is to stress
the application and closely observe the JVM limitations, which is a wordier
way of saying "What Tilman said".

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message