I use Aspose java pdf version 25.3. I try to convert following
test.pdf (45.5 KB)
pdf document to png but result file is dark (black) page
fsrc_page_1_900.jpg (48.0 KB)
I use following code for convert page:
public boolean convertPage(int page, String outPath, int width) {
com.aspose.pdf.Page aspPage= pdfDoc.getPages().get_Item(page);
int widthOrig = (int)aspPage.getPageRect(true).getWidth();
int heightOrig = (int)aspPage.getPageRect(true).getHeight();
int height=(int)(width*heightOrig/widthOrig);
Resolution resolution = new Resolution(300);
ImageDevice device= new PngDevice(resolution);
RenderingOptions opt = new RenderingOptions();
opt.setInterpolationHighQuality(true);
device.setRenderingOptions(opt);
device.process(aspPage, outPath);
return true;
}