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

Free Support Forum - aspose.com

It feels very slow to convert pdf to jpg. Is there any way to speed it up?

public static void main(String[] args) throws FileNotFoundException {
Document pdfDocument = new Document(“aaa.pdf”);
for (int pageCount = 1; pageCount <= pdfDocument.getPages().size(); pageCount++) {
// Create stream object to save the output image
String outputFilePath = “aa.jpg”;
log.info(“pdf outputFilePath:” + outputFilePath);
final Instant now = Instant.now();
java.io.OutputStream imageStream = new java.io.FileOutputStream(outputFilePath);

        JpegDevice JpegDevice = new JpegDevice(50);

        JpegDevice.process(pdfDocument.getPages().get_Item(pageCount), imageStream);


A ticket with ID PDFJAVA-40722 has been created in our issue tracking system to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.