We have an issue using Aspose Slides. We need to create presentations with high resolution images. As you can see from the attached example, when these presentations are saved as PDF using Aspose.Slides, images’ quality is lower than the same presentations saved using MS PowerPoint. Also that, the quality is lower than an Excel file saved using Aspose Cells that uses the same images.
Sorry, just a little update…
I’ve already tried to set the JpegQuality property using PdfOptions:
Aspose.Slides.Export.PdfOptions PdfOptions = new Aspose.Slides.Export.PdfOptions();
PdfOptions.JpegQuality = 100;
Pres.Save(root + “Output_using_Aspose_Slides.pdf”, Aspose.Slides.Export.SaveFormat.Pdf, PdfOptions);
But I’ve noticed no differences
I have observed the requirement shared by you and like to suggest you to try using PdfOptions.SufficientResolution for setting the dpi of images inside exported Pdf. The default value is 96. Please note that when you will increaese the resolution the quality of images inside PDF will increase but it will also increase the size of Pdf as well. You can devise the optimal balance between desired size and quality of exported PDF based on your requirements.
The generated PDF with resolution 200 is attached for your reference as well.
Thanks for the feedback. Now, I have some questions…
1. What are the differences between PdfOptions.JpegQuality and PdfOptions.SufficientResolution? Are these properties independent?
2. If images in my presentations are all inserted as .png, how can I ensure that they will not compressed or converted to .jpeg in the .pdf output file?
I like to share that setting the Jpeg quality actually means the percentage of the compression of Jpeg image in rendered PDF. If JpegQuality value is 50 then the image will be rendered with 50% compression as compared to actual image in presentation. Where as SufficentResolution property sets the overall resolution of the rendered slide. The default value of SufficentResolution is 96 but you can increase the value to improve the rendered quality of the slides that include images as well as per your requirements.
If images are inserted as PNG, they will be rendered the same in exported PDF and will not be converted to Jpeg in exported PDF.