Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: Rendering
    • Labels:
    • Environment:
      Windows 10
      java version "1.8.0_60"
      Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
      Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

      Description

      Run this:

      @Test
      public void testRendering() throws IOException {
          File pdfFile = new File("a.pdf");
          Assert.assertTrue(pdfFile.canRead());
      
          PDDocument document = PDDocument.load(pdfFile);
          Assert.assertEquals(2, document.getNumberOfPages());
      
          PDFRenderer pdfRenderer = new PDFRenderer(document);
          BufferedImage firstPageImage = pdfRenderer.renderImage(0, 1, ImageType.RGB);
      
          File pngFile = new File("a.png");
          ImageIO.write(firstPageImage, "png", pngFile);
      }
      

      The generated image is blank.

        Attachments

        1. a.pdf
          48 kB
          Johan Walter
        2. a.png
          3 kB
          Johan Walter

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              johan.walter Johan Walter
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: