We are trying to convert a pptx file to pdf file and have observed that the charts/graphics of some of the contents is getting distorted. I have attached two presentations and their respective generated slide images and pdfs where the issue is happening. I have attached the
Issue :
- When capturing a slide image of every slide in pptx, some of the images are having distortion in charts and graphics.
- When converting pptx file to pdf, some of the shapes are getting distorted/inverted.
Product Used :
- Aspose Slides 17.8.0.0
Code Used :
-
For Issue 1 :
private static void GetImageOfSlideSample(ISlide slide, string ImagePath)
{
float scale = 1;
Bitmap bitmap = slide.GetThumbnail(scale, scale);
bitmap.Save(ImagePath, System.Drawing.Imaging.ImageFormat.Jpeg);
bitmap.Dispose();
} -
For Issue 2 :
public static void ConvertPPTToPDF(string srcFilePath, string destFilePath)
{
registerLicense();
Presentation presentation = new Presentation(srcFilePath);
PdfOptions opts = new PdfOptions();
opts.SaveMetafilesAsPng = false;
opts.SufficientResolution = 90f;
presentation.Save(destFilePath, Aspose.Slides.Export.SaveFormat.Pdf, opts);
}