Convert pdf to jpg, the process is blocking

please help to solve this issue.
this pdf is
1.pdf (364.8 KB)

samle code:
List result = new ArrayList<>();
String outPath = “/Users/jimmy/test/picture”;
// Create Resolution object
try (com.aspose.pdf.Document document = new com.aspose.pdf.Document(filePath)) {
JpegDevice jpegDevice = new JpegDevice(50);
int pageCount = document.getPages().size();
if (pageCount > 0) {
for (int i = 1; i <= pageCount; i++) {
String fileName = outPath + i + “.jpg”;
try (java.io.OutputStream outputBinImageFile = new java.io.FileOutputStream(fileName)) {
jpegDevice.process(document.getPages().get_Item(i), outputBinImageFile);
result.add(fileName);
}
}
}
}
1.pdf (365 KB)

@ashurajay

Looks like the last page inside PDF has some issues as API is not able to convert it into an image.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFJAVA-43896

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like