Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-1692

java.lang.OutOfMemoryError: Java heap space

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.2
    • 1.8.3, 2.0.0
    • Text extraction
    • None
    • 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

    Description

      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

      Attachments

        1. Errors_when_buidling_pdfbox.jpg.png
          132 kB
          Anouar
        2. PDFBOX-1692.patch
          1 kB
          Tilman Hausherr
        3. test_1fd9a_test.pdf
          164 kB
          Christian Czech
        4. test_1fd9a_test-01.png
          172 kB
          Tilman Hausherr
        5. test_1fd9a_test-02.png
          83 kB
          Tilman Hausherr

        Issue Links

          Activity

            People

              lehmi Andreas Lehmkühler
              cnczechpdfbox Christian Czech
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: