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

JVM crashes on PDFRenderer.renderImageWithDPI

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.10, 2.0.0
    • Fix Version/s: 1.8.12, 2.0.0
    • Component/s: Rendering
    • Labels:
      None
    • Environment:
      Oracle Java 8 update 71, on both Mac OS X Yosemite and Ubuntu 14.04 LTS. Does not happen on OpenJDK 8.
    • Flags:
      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. problem.pdf
          124 kB
          Amos Ng
        2. problem2.pdf
          421 kB
          Amos Ng
        3. problem3_reduced.pdf
          6 kB
          Tilman Hausherr
        4. problem3.pdf
          152 kB
          Amos Ng

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              amosjyng Amos Ng

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment