[ 
https://issues.apache.org/jira/browse/PDFBOX-3294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15215592#comment-15215592
 ] 

Tilman Hausherr commented on PDFBOX-3294:
-----------------------------------------

That is because your PDF is huge. The media box is 3000 x 5135. An A4 page is 
595 x 841.

Solution: use a higher -Xmx value and use a lower dpi.

If possible, talk to the creator of the PDF. It can be much smaller if they use 
vector graphics instead of two images inside.

> After loading pdf through PDFRenderer(pdf), We are trying to take the first 
> page and convert that into preview image, but it is sometimes gets out of 
> memory.
> -------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-3294
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3294
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.0
>         Environment: Windows 8.1 OS, 8 GB ram, I5 processor
>            Reporter: Vijay
>            Priority: Blocker
>         Attachments: VFEpRJNMpdC1SCElMVN_ew__93_1_93_0.pdf, 
> originalVFEpRJNMpdC1SCElMVN_ew__93_1_93_0.pdf_VFQZ-4975.jpg, screenshot-1.png
>
>
> Senario 1. 
> After loading pdf through PDFRenderer(pdf), We are trying to take the first 
> page and convert that into preview image, but it is sometimes gets out of 
> memory by calling "pdfRenderer.renderImageWithDPI(0, 300, ImageType.RGB)",
> Senario 2.
> After loading pdf through PDFRenderer(pdf), We are trying to take the first 
> page and convert that into preview image, so we are calling 
> "pdfRenderer.renderImageWithDPI(0, 300, ImageType.RGB)", it takes more time 
> to return the bufferimage. 
> after we called ImageIOUtil.writeImage(bufferedImage, fileName, 175) tooks 
> more time to save it to local and the size of the image is very huge. 
> for example. 
> total size of the pdf -1.7 mb
> first page image size - 11 MB.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to