High CPU Usage and Very Long PPTX to PDF Conversion Time

We also have the same problem when converting to PDF. This is a very annoying problem, as Aspose use 100% of CPU on our web app so it needs to be restarted - unhappy users :frowning: .
We do a lot of things about quality management and excellence, so we deal a lot with files that include the EFQM model, which EFQM did in vector format with EMF files.
I enclose sample problematic file with only 1 slide with EFQM model logo which is only 1MB, but if you want to convert to PDF it takes 300 seconds on my computer (Intel® Core™ i7-8850H CPU @ 2.60GHz, 32 GB RAM, Windows 11).
I used Aspose.Slides.21.12.

Code for reproduce issue:

		String s = "D:/aspose/bugs/EFQM/EFQM2.pptx";
		String sOut = "D:/aspose/bugs/EFQM/EFQM2.pdf";
		Presentation doc = new Presentation(s);
		doc.save(sOut, com.aspose.slides.SaveFormat.Pdf);

Beside the issue with high CPU and very long conversion time, the quality of converted image is also low.

EFQM2.zip (1.0 MB)

@uros,
Thank you for reporting the issue.

I’ve reproduced the problem with the presentation taking a long time to convert to PDF and added a ticket with ID SLIDESJAVA-38737 in our issue tracking system. Our development team will investigate this case. You will be notified when the issue is resolved.

Please note that the EMF image in the presentation itself may have some problems. I converted the presentation with Office 365 PowerPoint and got th following result: EFQM2_out_by_PowerPoint.pdf (166.3 KB)

To keep the quality for EMF images, you can use setSaveMetafilesAsPng method as shown below:

PdfOptions pdfOptions = new PdfOptions();
pdfOptions.setSaveMetafilesAsPng(false);

var presentation = new Presentation("example.pptx");
presentation.save("example_out.pdf", SaveFormat.Pdf, pdfOptions);

Documents: Convert PowerPoint to PDF
API Reference: PdfOptions Class

But unfortunately for now the PDF will look the same as the one generated by PowerPoint.

The issues you have found earlier (filed as SLIDESJAVA-38737) have been fixed in Aspose.Slides for Java 22.3 (ZIP).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.