pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hewson <j...@jahewson.com>
Subject Re: PDFRendering
Date Mon, 27 Jun 2016 13:39:32 GMT

> On 24 Jun 2016, at 00:55, Ankit Agarwal <ankyizhere@gmail.com> wrote:
> Hi,
> When i try to covert pdf to image then for some pdfs i get a "out of
> memory" error. So i increased heap size and then i again got the error for
> some different pdf file.
> for the time being assume I have no memory leak from other objects. So what
> would be the reason for this memory out of error?
> Would it be just that the image is so large(which is not the case i think)
> that it consumes heap, or maybe pdfbox stores buffered image of each pages
> in its memory and this contributes to the growing heap size?
> Any insight would be wonderful.

Usually it’s because the PDF contains a compressed image which is very large
when decompressed. So the file isn’t big on disk, but it is in memory. Try using
a 32-bit JVM as these use less memory. 1GB of heap is usually enough but you
can go larger.

— John
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org

View raw message