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

Free Support Forum - aspose.com

File size decreases after adding custom property in ppt file

I’m trying to add a custom property in ppt file using Aspose.Slides.dll (.NET).
Following is the code snippet for the same.

Aspose.Slides.LoadFormat lLoadFormat = Aspose.Slides.LoadFormat.Ppt;
Aspose.Slides.Export.SaveFormat lSaveFormat = Aspose.Slides.Export.SaveFormat.Pptx;

Aspose.Slides.LoadOptions lLoadOptions = new Aspose.Slides.LoadOptions(lLoadFormat);
lLoadOptions.OnlyLoadDocumentProperties = false;

Aspose.Slides.Presentation lSlidesDoc = new Aspose.Slides.Presentation(pstrFilePath, lLoadOptions);

lSlidesDoc.DocumentProperties[“SampleProperty1”] = “Value1”;
lSlidesDoc.DocumentProperties[“SampleProperty2”] = “Value2”;

lSlidesDoc.Save(pstrFilePath + “OUT.ppt”, lSaveFormat);

The issue is that the file size decreases after the process completes.
For the attached sample files:
The input file is - Original sample file.ppt Size is 43KB
The output file is - Original sample file.pptOUT.ppt Size is 10KB

Can someone please explain why there is decrease in the file size after processing.

Sample Files.zip (26.4 KB)


I have worked with source file and sample code shared by you using Aspose.Slides for .NET 18.7 and unable to observe any size issue. Can you please check attachment. Also please share which Aspose.Slides version you are using on your so along with environment details so that we may further investigate to help you out.OUT.zip (33.4 KB)


I tried using the latest 18.7 Aspose.Slides for .NET and this time the size of the output file increased.Sample Files - Copy.zip (47.8 KB)

Previously, I used Aspose.Slides for .NET v15.2
Please let me know, what kind of environment details you require me to share.


I have observed your comments. Can you please share working sample project and OS details for further investigation so that we may help you out.

Hello @Adnan.Ahmad, please find the attached solution.
Seclore Aspose Tool.zip (9.5 MB)

I’m using Visual Studio 2013 on Windows 8, 64-bit Operating System.

Please let me know if you need any more details.


I have observed your comments. I like to inform that during the serialization Slides updates the internal PowerPoint PPT file structures. If the original file was not generated via Slides, the size will be increased because of this. Properties changing is not the reason why file size increased. This is the Slides specific.