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

Free Support Forum - aspose.com

Hang issue in Aspose.Pdf for Java 17.2.0

Hi team:


We found a hang (cpu 100%) issue @Aspose.Pdf for Java 17.2.0

java code:

Document pdfDocument = new Document(new ByteArrayInputStream(data));
try (ByteArrayOutputStream imageOut = new ByteArrayOutputStream()) {
Page pdfPage = pdfDocument.getPages().get_Item(1);

Rectangle rect = pdfPage.getPageRect(true);
// inch to pixel
int originWidth = (int) (rect.getWidth() * 96 / 72);
int originHeight = (int) (rect.getHeight() * 96 / 72);

JpegDevice jpegDevice = new JpegDevice(originWidth, originHeight, new Resolution(300));
jpegDevice.process(pdfPage, imageOut);
return imageOut.toByteArray();
} finally {
pdfDocument.close();
}

as attachment

Aspose.Pdf for Java 17.2.0
Oracle jdk 1.8.0_111
CentOS 7 64bit

Hi Lai,


Thanks for your inquiry. I have tested the scenario with your shared PDF document and noticed that it hangs the system, so logged a ticket PDFJAVA-36578 in our issue tracking system for further investigation and rectification. We will keep you updated about the issue resolution progress within this forum thread.

We are sorry for the inconvenience.

Best Regards,

The issues you have found earlier (filed as PDFJAVA-36578) have been fixed in Aspose.Pdf for Java 17.5.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.