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

Free Support Forum - aspose.com

Open and Modify (Read-only) Presentations using Aspose.Slides for .NET

Hello,

I am working with open & modify password protected PPTX.

In PowerPoint I can open this presentation using the open password, I am then prompted for the modify password or to open the presentation as read-only.

In Aspose, the open password in the load options works as expected.

As for the modify password, I can tell if the file is write-protected using the ProtectionManager.IsWriteProtected() method, but can find no way to test the modify password on the presentation to open it for editing.

I can remove the write protection via ProtectionManager.RemoveWriteProtection() but it doesn’t ask for a password. I see that I can set the write protection with a password using the ProtectionManager but I see no way of verifying it.

Right now, a modify-protected presentation can be opened and edited without inputting the modify password.

For instance, my modify-protected PPTX has a hidden slide. In Aspose I can open it with the password, and export it to PDF with ShowHiddenSlides=True and see the hidden slide in my PDF output. In Powerpoint the same slide will prompt for a modify password or open the presentation read-only. If I open is as read-only (i.e. I don’t have the password) I cannot print or export this presentation.

Is there a different way of validating the PPTX passwords?

Thanks,

Sheri

@sheri_steeves,

I have observed your comments. Can you please share the sample project along with source and generated files so that we may further investigate to help you out.

@Adnan.Ahmad

I have attached a zip file with a sample Powerpoint (pptx) that is password protected for both open and modify. The open password is PEERNET and the modify password is TEST.

Powerpoint-PSWD-MOD[PEERNET-TEST]-HiddenSlide.zip (66.2 KB)

Thanks,

Sheri

@sheri_steeves,

As requested earlier, please share the used sample project along with generated presentation with us. We shall be able to investigate the issue on provision of requested information.

@Adnan.Ahmad,

Sorry about that. Here is a zip containing the Program.cs from a console test app that shows what I’m doing/trying to achieve.

Program.zip (1.6 KB)

Sheri

@sheri_steeves,

I have worked with sample code and presentation file shared by you and have been able to observe the issue specified. An issue with ID SLIDESNET-40147 has been added in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Thanks for the quick response.

I would ask that you keep the current method of being able to remove the write protection without the password, as well as having the ability to test and validate the modify password. Both scenarios are useful.

Sheri

@sheri_steeves,

We will share the good news with you as soon as the issue will be fixed.