You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Christian Czech (JIRA)" <ji...@apache.org> on 2013/08/12 18:16:48 UTC

[jira] [Created] (PDFBOX-1692) java.lang.OutOfMemoryError: Java heap space

Christian Czech created PDFBOX-1692:
---------------------------------------

             Summary: java.lang.OutOfMemoryError: Java heap space
                 Key: PDFBOX-1692
                 URL: https://issues.apache.org/jira/browse/PDFBOX-1692
             Project: PDFBox
          Issue Type: Bug
          Components: Text extraction
    Affects Versions: 1.8.2
         Environment: Windows 7
java version 1.7.0_17 (build 1.7.0_17-b02/64-Bit Server VM build 23.7-01)
pdfbox-app-1.8.2.jar
            Reporter: Christian Czech


Hello,

I have a problem with text extraction.
The problem is not enough memory in VM during the text extraction!

My Code:
String pdfFile = "D:\testfolder\test1fd9a_test.pdf"; //size of file 168 KB
PDDocument document = PDDocument.load(pdfFile, true);

PDFTextStripper stripper = null;
try {
stripper = new PDFTextStripper();
stripper.setSortByPosition(true);
stripper.writeText(document, outputWriter);
} catch () {
}

You get an error:
java.lang.OutOfMemoryError: Java heap space 


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira