Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

PDF to png image conversion

$
0
0
Hi Team,

I am trying to convert a PDF file to image
But every time i am getting a blank image.

Following is the code i am using from examples

com.aspose.pdf.facades.PdfConverter converter = new com.aspose.pdf.facades.PdfConverter();
                        converter.bindPdf(Environment.getExternalStorageDirectory().getAbsolutePath()+"/VignetteGuichet-1bis_30.pdf");

//Set start and end pages
                        converter.setStartPage(1);
                        converter.setEndPage(1);

//Initialize conversion process
                        converter.doConvert();

//Convert pages to images
                        String suffix = ".png";
                        int imageCount = 1;
                        while (converter.hasNextImage())
                        {
                            converter.getNextImage(Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+imageCount + suffix);
                            imageCount++;


                        }


Attaching the PDF file I used to convert.

Please help in resolving this issue


Viewing all articles
Browse latest Browse all 3131

Trending Articles