Images Are Fuzzy when Converting PowerPoint Presentation to PDF in Java

They converted PPT to PDF by aspose API, and the pictures were clearly in PPT format, but fuzzy for PDF. They tried to convert PPT to PDF by Office 365, the pictures were clear. Is there some way to improve the picture clarity after converting?

@Jillianliu

Looks like the query is related to Aspose.Slides and we have moved it to the respective category where you will be assisted shortly.

@Jillianliu,
You can use the PdfOptions class to control the image quality in output PDF documents. Please try using the code example below.

var options = new PdfOptions();
options.setSaveMetafilesAsPng(false);
options.setSufficientResolution(300);
options.setJpegQuality((byte)95);

var presentation = new Presentation("sample.pptx");
presentation.save("output.pdf", SaveFormat.Pdf, options);
presentation.dispose();

More examples: Convert PowerPoint to PDF in Java|Aspose.Slides Documentation

If the issue persists, please share the following additional information:

  • sample presentation file
  • output PDF file
  • OS version on which the conversion was performed
  • JDK target version in your application project
  • Aspose.Slides version you used

Then we will investigate the case and assist you.

Hi Andrey:

Thank you for your reply, we have tested the code but the image quality didn’t get improved. Below is the code we used and the files we found that has vague image.

FileTransferServiceImpl.zip (1.8 KB)

Downloads.zip (1.0 MB)

Warm regards
Jillian

@Jillianliu,
Thank you for the issue details. I used your code example with Aspose.Slides for Java 24.9 to convert the attached PowerPoint presentation to a PDF document. The images are displayed in the output document in the same way as in PowerPoint:
output.pdf (347.2 KB)
compare.jpg (201.2 KB)

We recommend that you use the latest version of Aspose.Slides for Java.

Hi Andrey:

Thank you for your reply. Have you tried to transfer pdf with Java 23.3? If you have the same result with us, then the issue should be caused by java version.

Warm regards
Jillian

@Jillianliu,
I used Aspose.Slides for Java 23.3 with different JDK versions and got the same results as you. It seems that converting PowerPoint presentations to PDF documents was improved for images later.

Hi Andrey:

Thank you very much for your help, if we are going to upgrade the java version and solve this problem, any SDK version is required? Or java 24.9 with any SDK version is ok to proceed.

Warm regards
Jillian

@Jillianliu,
Thank you for your question. I used Aspose.Slides for Java 24.9/24.10 with many JDK versions. The result looks fine as above.

Hi Andrey:

Thank you very much for your help.

Warm regards
Jillian

@Jillianliu,
Thank you for using Aspose.Slides.