We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Pdf to png corruption

My most pdfs don’t get converted to pngs correctly. I am sharing the
code, and the test documents. Please let me know if I am doing
something wrong.

private List convertPdfToPng() {

List imageIdList = null;

final int PDF_RESOLUTION = 100;

try {

imageIdList = new ArrayList();

PdfConverter converter = new PdfConverter();

converter.bindPdf(localFolder + fileName);


while (converter.hasNextImage()) {

String imageId = generateUUID();

converter.getNextImage(localFolder + imageId, ImageType.PNG);



return imageIdList.size() == 0 ? null : imageIdList;

} catch (Throwable e) {

return null;




Thanks for using our products.

have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as
will investigate this issue in details and will keep you updated on the status
of a correction.

apologize for your inconvenience.