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

Converting PDF to Image Quality Issue

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.0.8
    • Fix Version/s: None
    • Component/s: Rendering
    • Labels:
      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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: