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

PDFTextStripper.writeText is slow

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.8.9, 1.8.10
    • 2.0.0
    • Text extraction
    • Mac OS X 10.10.4
      java version "1.8.0_31"

    Description

      I inserted raw time reporting functions before and after PDFTextStripper.writeText, it looks like it takes quite long to writeText to a StringWriter (84045ms for a ~1M pdf file).
      It looks like a 1.8.x issues (I can reproduce on 1.8.9 and 1.8.10, didn't test on other versions yet). When I switched to 2.0.0-SNAPSHOT, and the time improved dramatically to 532ms using the same code and for the same pdf file. What I changed in code was only one import to accommodate PDFTextStripper's package change in 2.0.0.

      Attachments

        Activity

          People

            Unassigned Unassigned
            azurvii V
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: