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

Free Support Forum - aspose.com

Decrypting PPT File throws ArgumentOutOfRangeException

Hi,

I’m using Slides for C++.
When I’m trying to decrypt a ppt file, it failed with System ArgumentOutOfRangeException index
I used this two methods:
ProtectionManager.RemoveEncryption and ProtectionManager.RemoveWriteProtection

Test file: http://dl.05nx.com/aspose.test.ppt.error.7z

Thanks.

@kngstr,
Thank you for contacting support.

Unfortunately, I cannot use your link to download the test file. Please share it from another source.

@Andrey_Potapov

This source was shared many times here.
Could you please try it again?

I already tried other source I can access, but only this works.
There are no more other source can be accessed from China.

@kngstr,
Unfortunately, the link does not work on my end. Please try to use Upload button on our post form. upload.png (20.2 KB)

If your file is large, please try splitting it.

@Andrey_Potapov

Unfortunately I don’t know the password to split it.
And this forum can not upload files splited by 7z or rar.

PS: What error did you get from this link?

@kngstr,
You can change the extension of split parts to upload them here.

When I click on this link, nothing happens.

@Andrey_Potapov

Thanks.
Here are files splitted by 7z. Please remove the last .7z.
2016文科老师普通话培训(1).7z.001.7z (4.8 MB)
2016文科老师普通话培训(1).7z.002.7z (4.8 MB)
2016文科老师普通话培训(1).7z.003.7z (3.7 MB)

@kngstr,
This presentation was encrypted by password to open. Therefore, you have to know this password to load the presentation first:

auto loadOptions = System::MakeObject<LoadOptions>();
loadOptions->set_Password(u"my_password");
    
auto presentation = System::MakeObject<Presentation>(u"test.pptx", loadOptions);

Then you can be able to remove passwords to open and write protection.

Documents: Password Protected Presentation
API Reference: LoadOptions Class

@Andrey_Potapov

It was encrypted by password to edit, not password to open.
It did can be decrypted with Slides for C++ SDK.
If I copy one page to a new file, it works fine.
But if I try to deal the 3 and 6 page, it failed with System::ArgumentOutOfRangeException::index.

@kngstr,
I am sorry for my mistake. I reproduced the problem with removing write protection and added a ticket with ID SLIDESCPP-3258 in our issue tracking system. Our development team will investigate this case. You will be notified when the issue is resolved.

@Andrey_Potapov

Thanks

@Andrey_Potapov

Another pptx file which can not be decrypted with edit password.
Here are files splitted by 7z. Please remove the last .7z.
1.语音,核心搭配.7z.001.7z (5.7 MB)
1.语音,核心搭配.7z.002.7z (5.7 MB)
1.语音,核心搭配.7z.003.7z (5.7 MB)
1.语音,核心搭配.7z.004.7z (5.7 MB)
1.语音,核心搭配.7z.005.7z (3.5 MB)

@kngstr,
Thank you for the presentation example. I’ve passed it to our developers.