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

Free Support Forum - aspose.com

PasswordProtected Check

Hello,

How can I check if ppt file is password protected?
(something like Word’s: Aspose.Words.FileFormatUtil.DetectFileFormat(config.SourceFile).IsEncrypted)
)
Thanks,
Roi

Hi Roi,


I have observed the requirement shared by you and like to share that we have already added the requested support in upcoming release of Aspose.Slides for .NET 14.5.0. An issue with ID SLIDESNET-35379 has already been added to provide the requested support.We will share the notification with you as soon as the product will be shared on-line and you can verify the support afterwards.

Many Thanks,

Hi,

Do you have any prognosis when it will be done?
Thanks,
Roi

Hi Roi,


It is infact done and will be shared with upcoming release which is likely to be shared during next week.

Many Thanks,

Thanks Mudassir!

The issues you have found earlier (filed as SLIDESNET-35379) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(4)

Hi Mudassir,
I tried to do this with the new version (14.5.0) but I didn’t succeed.
(I saw “Aspose.Slides.IPresentationInfo interface and PresentationInfo class have been added” in
http://www.aspose.com/community/files/51/.net-components/aspose.slides-for-.net/entry560171.aspx)
Can you please help me to know how to check if ppt file is password protected (without trying to load it and get an exception…)
Thanks.
Roi

Hi Roi,

I have observed the requirement shared by you and suggest you to please try using the following sample code on your end to verify the presentation as password protected or not without loading that.

IPresentationInfo info;

info = PresentationFactory.Instance.GetPresentationInfo(m_rootFolder + “\Password\open.ppt”);
Assert.AreEqual(info.LoadFormat, LoadFormat.Ppt);
Assert.IsFalse(info.IsEncrypted);

Please, share if I may help you further in this regard.

Many Thanks,

Hi Mudassir,



Thanks! It works!

I impelemented it this way:



if (PresentationFactory.Instance.GetPresentationInfo(m_rootFolder + “\Password\open.ppt”).IsEncrypted)

result = true;





Have a nice day,

Roi.