You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Ankit Agarwal (JIRA)" <ji...@apache.org> on 2016/06/23 07:49:16 UTC

[jira] [Closed] (PDFBOX-3394) OutOFMemoryError(Heap Space)

     [ https://issues.apache.org/jira/browse/PDFBOX-3394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ankit Agarwal closed PDFBOX-3394.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.1

Increasing Heap size will solve this

> OutOFMemoryError(Heap Space)
> ----------------------------
>
>                 Key: PDFBOX-3394
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3394
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Documentation, Rendering
>    Affects Versions: 2.0.1, 2.0.2
>         Environment: Windows 7, jre 1.8 , 
>            Reporter: Ankit Agarwal
>            Priority: Blocker
>              Labels: newbie
>             Fix For: 2.0.1
>
>
> Here's a segment of my code.
> //code
> try
> {
> PDFRenderer pdfRenderer = new PDFRenderer(pdDoc);
>  BufferedImage image = pdfRenderer.renderImageWithDPI(page-1, 300,ImageType.GRAY);
>  ImageIOUtil.writeImage(image,"G:/Trial/tempImg.png", 300);
> //some codes 1
> }
> catch(Exception e)
> {
> //printing something
> }
> finally{
> //some codes 2
> }
> //code
> When I debugged this code, i saw that just after the line renderImage withDPI ,control reaches finally and just after finally I get out of memory error. After the buffered image line ideally control sgould execute "some codes 1" which are just after that line but instead control skips all that and reaches finally, it doesnt even go to catch , so I cant understand why is this happening.
> Please provide some insight on this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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