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

JVM crashes on PDFRenderer.renderImageWithDPI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.10, 2.0.0
    • 1.8.12, 2.0.0
    • Rendering
    • None
    • Oracle Java 8 update 71, on both Mac OS X Yosemite and Ubuntu 14.04 LTS. Does not happen on OpenJDK 8.
    • Important

    Description

      When running the following Scala program on one of the attached PDFs:

      import org.apache.pdfbox.pdmodel.PDDocument
      import org.apache.pdfbox.rendering.PDFRenderer
      import java.io.File
      
      object FigureExtractorBatchCli {
        def main(args: Array[String]): Unit = {
          new PDFRenderer(PDDocument.load(new File("problem.pdf"))).renderImageWithDPI(0, 195)
        }
      }
      

      a fatal error occurs with the JVM at the call to java.awt.Graphics2D.draw.

      For problem.pdf this only happens at a DPI >= 195. For problem2.pdf it's DPI >= 5. For problem3.pdf it happens at any DPI.

      Attachments

        1. problem3.pdf
          152 kB
          Amos Ng
        2. problem3_reduced.pdf
          6 kB
          Tilman Hausherr
        3. problem2.pdf
          421 kB
          Amos Ng
        4. problem.pdf
          124 kB
          Amos Ng

        Issue Links

          Activity

            People

              Unassigned Unassigned
              amosjyng Amos Ng
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: