Hi

I am using pdfbox-app-2.0.0 in my program.

I am using the following code:

public JPanel makeDocument() throws IOException, FileNotFoundException{

        File target = new File(filePath);

        PDDocument pddocument = PDDocument.load(target);

         JPanel displayView;

          PDFRenderer pdfrend = new PDFRenderer(pddocument);


            for (int i = 0; i < pddocument.getNumberOfPages(); i ++){

                //BufferedImage pageImage = pdfrend.renderImage(i,0.9f);
                BufferedImage pageImage = pdfrend.renderImageWithDPI(i,300);

                this.docList.add(pageImage);
            }



            displayProcessing = new DisplayDocs2(this.docList);

            displayView = displayProcessing.getPanel();

          pddocument.close();

        return displayView;

    }

when I use this code to open a computer produced pdf (with a white background) it works fine.

But when I try to open a pdf which was a scanned page it come out pixelated and pretty much unreadable like grey instead of white background has an effect.

Any help gratefully received. Sorry for my bad descriptive skills I am learning as I go.

Gerry



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to