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

Free Support Forum - aspose.com

Image not visible when save as pdf from ppt

I am first open ppt file and update lable text and image replace with new image etc.

Then I am saving updated presentation with new name and then save as pdf.

So problem is whatever Image is updated that image not visible in pdf but properly visible in PPT.

How to image is updated:
In Existing PPT file one already have image I just replace image with new image.

This things sometime work and sometime is not working.

Sample Code:
using (Presentation presentationNotes = new Presentation(notesTemplateFilePath))
{
foreach (var item in shapes)
{
if (item is PictureFrame)
{
var oldPictureFrame = item as PictureFrame;
switch (oldPictureFrame.Name)
{
case “picReportCard”:
if (!File.Exists(reportCardImageFile))
{ continue; }
               <span style="color:blue;">using</span> (<span style="color:blue;">var</span> newImage = System.Drawing.<span style="color:#2b91af;">Image</span>.FromFile(reportCardImageFile))
               {
                  oldPictureFrame.PictureFormat.Picture.Image.ReplaceImage(newImage);
               }
               <span style="color:blue;">break</span>;
                }                    
            }               

            objAutoShape.ShapeLock.SelectLocked = <span style="color:blue;">true</span>;
            objAutoShape.ShapeLock.TextLocked = <span style="color:blue;">true</span>;
        }</pre><pre style="font-family: Consolas; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><br></pre><pre style="font-family: Consolas; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">presentation.Save(exportPptPath, Aspose.Slides.Export.<span style="color:#2b91af;">SaveFormat</span>.Pptx);

presentation.Save(exportPdfPath, Aspose.Slides.Export.SaveFormat.Pdf);
}



Hi Rikin,


I have observed your comments. Can you please share source files and generated files so that we can investigate issue yo help you out. Also please share which Aspose.Slides version you are using on your end.

Best Regards,