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

Converting PDF to Image Quality Issue

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 2.0.8
    • None
    • Rendering
    • None

    Description

      Dear Sir,

      Previously we have used PdfBox1.6.0 API to convert PDF to images.Now we have updated latest version PdfBox2.0.8 quality of image something mesh...

      PDFBox 1.6.0

      ---------------------

      List<PDPage> list = document.getDocumentCatalog().getAllPages();
                       for (PDPage page : list)

      {                      BufferedImage image = page.convertToImage();                     listOfImages.add(image);                  }

      PDFBox2.0.8

      ---------------------

      ByteArrayInputStream bis = new ByteArrayInputStream(finalReportData);
                      PDDocument document = PDDocument.load(bis);
                      PDFRenderer pdfRenderer = new PDFRenderer(document);
                      
                      for (int page = 0; page < document.getNumberOfPages(); ++page)
                      

      {                     BufferedImage image = pdfRenderer.renderImageWithDPI(page, 350, ImageType.RGB);                     listOfImages.add(image);                 }

       

      Please find attached screens as well quality of image.Can you please help on this to increase quality of image asap.

      Thanks,

      -Naga

       

       

      Attachments

        1. pdfbox_1_0_6.PNG
          46 kB
          Naga Gpr
        2. pdfbox_2_0_8.PNG
          32 kB
          Naga Gpr

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            naga.gpr Naga Gpr
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment