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