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

Converting PDF to Image gives error and the image generated is of poor quality

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.0
    • 2.0.0
    • Rendering
    • Windows 7 Professional

    Description

      please download a pdf from http://www.fujixeroxprinters.com.au/downloads/uploaded/DocuPrint%20Mono%20205%20Series_8c68.pdf (now attached to this issue)

      and Try converting it to images using below command through command prompt :-
      java -jar pdfbox-app-1.6.0.jar PDFToImage abc123.pdf

      It generated images for me but images generated are of very poor quality and I can see exceptions also in command prompt.
      Below is the error I get on console :-

      WARNING: java.io.IOException: Not Implemented
      java.io.IOException: Not Implemented
      at org.apache.pdfbox.pdfviewer.PageDrawer.SHFill_Axial(PageDrawer.java:4
      79)
      at org.apache.pdfbox.pdfviewer.PageDrawer.SHFill(PageDrawer.java:412)
      at org.apache.pdfbox.util.operator.pagedrawer.SHFill.process(SHFill.java
      :58)
      at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngin
      e.java:551)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngi
      ne.java:274)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngi
      ne.java:251)
      at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.
      java:225)
      at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:107)
      at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:722)
      at org.apache.pdfbox.util.PDFImageWriter.writeImage(PDFImageWriter.java:
      135)
      at org.apache.pdfbox.PDFToImage.main(PDFToImage.java:231)
      at org.apache.pdfbox.PDFBox.main(PDFBox.java:58)
      Jul 7, 2011 9:51:17 AM org.apache.pdfbox.pdfviewer.PageDrawer SHFill
      INFO: Shading = Shading COSName

      {Sh0}

      ShadingType: 3
      ColorSpace: DeviceN{ }
      AntiAlias: false
      Coords: COSArray{[COSFloat

      {0.0}, COSFloat{0.0}

      , COSFloat

      {0.0}, COSFloat{0.0}

      , COSFloat

      {0.0}, COSFloat{1.0}]}
      Domain: COSArray{[COSFloat{0.0}

      , COSFloat

      {1.0}]}
      Function: org.apache.pdfbox.pdmodel.common.function.PDFunctionType3@1b59
      98f
      Extend: COSArray{[true, true]}
      Raw Value:
      COSDictionary{(COSName{ColorSpace}:COSArray{[COSName{DeviceN}, COSArray{[COSName {Black}]}, COSName{DeviceCMYK}, COSObject{487, 0}, COSObject{485, 0}]}) (COSName {AntiAlias}:false) (COSName{Coords}:COSArray{[COSFloat{0.0}, COSFloat{0.0}, COSF
      loat{0.0}, COSFloat{0.0}, COSFloat{0.0}, COSFloat{1.0}

      ]}) (COSName

      {Function}

      :COS
      Dictionary{(COSName

      {FunctionType}

      :COSInt

      {3}) (COSName{Encode}:COSArray{[COSFloat {0.0}, COSFloat{1.0}, COSFloat{0.0}, COSFloat{1.0}]}) (COSName{Domain}:COSArray{
      [COSFloat{0.0}, COSFloat{1.0}]}) (COSName{Functions}:COSArray{[COSObject{621, 0}
      , COSObject{620, 0}]}) (COSName{Bounds}:COSArray{[COSFloat{0.840652}]}) }) (COSN
      ame{Extend}:COSArray{[true, true]}) (COSName{Domain}:COSArray{[COSFloat{0.0}, CO
      SFloat{1.0}]}) (COSName{ShadingType}:COSInt{3}

      ) }
      Jul 7, 2011 9:51:17 AM org.apache.pdfbox.util.operator.pagedrawer.SHFill process

      WARNING: java.io.IOException: Not Implemented
      java.io.IOException: Not Implemented
      at org.apache.pdfbox.pdfviewer.PageDrawer.SHFill_Radial(PageDrawer.java:
      493)
      at org.apache.pdfbox.pdfviewer.PageDrawer.SHFill(PageDrawer.java:415)
      at org.apache.pdfbox.util.operator.pagedrawer.SHFill.process(SHFill.java
      :58)
      at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngin
      e.java:551)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngi
      ne.java:274)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngi
      ne.java:251)
      at org.apache.pdfbox.util.operator.pagedrawer.Invoke.process(Invoke.java
      :130)
      at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngin
      e.java:551)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngi
      ne.java:274)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngi
      ne.java:251)
      at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.
      java:225)
      at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:107)
      at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:722)
      at org.apache.pdfbox.util.PDFImageWriter.writeImage(PDFImageWriter.java:
      135)
      at org.apache.pdfbox.PDFToImage.main(PDFToImage.java:231)
      at org.apache.pdfbox.PDFBox.main(PDFBox.java:58)
      Writing: abc1234.jpg

      Attachments

        1. EnviroNewsSummer2009.pdf
          3.27 MB
          Geoffroy Schneck
        2. DocuPrint Mono 205 Series_8c68.pdf
          994 kB
          John Hewson

        Issue Links

          Activity

            People

              jahewson John Hewson
              nidhijaingndu Nidhi Jain
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: