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

Remove imageIO dependency (was: PDPage convertToImage bug creates white images from black and white pdf files.)



    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.2.0, 1.2.1, 1.3.1, 1.4.0, 1.5.0
    • 1.6.0
    • None
    • JDK 1.6.0_22


      This bug has been reported in various other tickets submitted before. I am attempting to conclusively prove that this is an issue, and it needs to be attended to since all past tickets regarding this bug have been marked invalid.

      I have attached a video showing very basic code that will reproduce the issue. I have also attached the code that causes the issue, as well as a PDF file that works (a color one), and a black and white PDF file that doesn't.

      The main issue is that when reading a black and white PDF file (see attached black and white pdf file), the following message is displayed, and the contents of the output image is completely white.

      26/05/2011 3:20:14 PM org.apache.pdfbox.util.operator.pagedrawer.Invoke process
      WARNING: getRGBImage returned NULL

      We use PDFBox in our program for reading PDF files, and at least 50 percent of our customer's PDF files (from different scanners) will not read because of this issue. This is a complete show stopper, and I'd be more than happy to help in any way I could to resolve it.


        1. BlackAndWhiteBug.java
          1 kB
          Roland Quast
        2. black_and_white.pdf
          26 kB
          Roland Quast
        3. ColorWorks.java
          1 kB
          Roland Quast
        4. color.pdf
          226 kB
          Roland Quast
        5. PDFBOX1018-black_and_white1.png
          19 kB
          Andreas Lehmkühler
        6. tast_bb.pdf
          149 kB
          Roland Quast

        Issue Links



              lehmi Andreas Lehmkühler
              rquast Roland Quast
              0 Vote for this issue
              1 Start watching this issue