You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2022/03/18 16:29:00 UTC

[jira] [Commented] (PDFBOX-5392) java.lang.OutOfMemoryError: Java heap space during ScratchFileBuffer#addPage

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

Tilman Hausherr commented on PDFBOX-5392:
-----------------------------------------

Please mention the version, and attach the files that bring this problem. Also try a larger -Xmx value, e.g. -Xmx2G or -Xmx4G

> java.lang.OutOfMemoryError: Java heap space during ScratchFileBuffer#addPage
> ----------------------------------------------------------------------------
>
>                 Key: PDFBOX-5392
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5392
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: 黄文杰
>            Priority: Major
>
> 在对一个73页的pdf文件,进行拆分单页pdf文件,再重新进行合并时,内存溢出了
> java.lang.OutOfMemoryError: Java heap space
>     at org.apache.pdfbox.io.ScratchFileBuffer.addPage(ScratchFileBuffer.java:132)
>     at org.apache.pdfbox.io.ScratchFileBuffer.ensureAvailableBytesInPage(ScratchFileBuffer.java:184)
>     at org.apache.pdfbox.io.ScratchFileBuffer.write(ScratchFileBuffer.java:236)
>     at org.apache.pdfbox.io.ScratchFile.createBuffer(ScratchFile.java:423)
>     at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:970)
>     at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:891)
>     at org.apache.pdfbox.multipdf.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:259)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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