Page 1 of 1
Password protect pdf
Posted: Fri Sep 15, 2017 10:59 am
by terje.pedersen
settings = new Stimulsoft.Report.Export.StiPdfExportSettings();
settings.userAccessPrivileges = Stimulsoft.Report.Export.StiUserAccessPrivileges.All;
settings.keyLength = Stimulsoft.Report.Export.StiPdfEncryptionKeyLength.Bit128;
settings.passwordInputUser = password;
settings.passwordInputOwner = password;
Is there something more I need to do, the pdf is still created without password protection?
Re: Password protect pdf
Posted: Fri Sep 15, 2017 2:01 pm
by Alex K.
Hello,
Unfortunately, in the JS version, at the current moment, this feature is not available.
There is task in our to-do list, but I cannot say when it will be available.
Thank you.
Re: Password protect pdf
Posted: Tue Mar 29, 2022 2:06 am
by ervin.tanig
terje.pedersen wrote: ↑Fri Sep 15, 2017 10:59 am
settings = new Stimulsoft.Report.Export.StiPdfExportSettings();
settings.userAccessPrivileges = Stimulsoft.Report.Export.StiUserAccessPrivileges.All;
settings.keyLength = Stimulsoft.Report.Export.StiPdfEncryptionKeyLength.Bit128;
settings.passwordInputUser = password;
settings.passwordInputOwner = password;
Is there something more I need to do, the pdf is still created without password protection?
Hello! Can I ask if this is applied to where ? I'm trying to do the password protect pdf
Re: Password protect pdf
Posted: Tue Mar 29, 2022 8:08 am
by HighAley
Hello,
These settings are working in our current build.
Do you get any issue with them?
Thank you.
Re: Password protect pdf
Posted: Fri Apr 08, 2022 12:55 pm
by monarch
ervin.tanig wrote: ↑Tue Mar 29, 2022 2:06 am
Hello! Can I ask if this is applied to where ? I'm trying to do the password protect pdf
Using directive
using Stimulsoft.Report.Export;
Before export
StiPdfExportSettings settings = new StiPdfExportSettings();
settings = new StiPdfExportSettings();
settings.UserAccessPrivileges = Stimulsoft.Report.Export.StiUserAccessPrivileges.All;
settings.KeyLength = Stimulsoft.Report.Export.StiPdfEncryptionKeyLength.Bit128;
settings.PasswordInputUser = "pass";
settings.PasswordInputOwner = "pass";
Then
oreport.ExportDocument(StiExportFormat.Pdf, file, settings);
And report is exported with password
Re: Password protect pdf
Posted: Sun Apr 10, 2022 10:27 am
by Lech Kulikowski
Hello,
Thank you for the provided information.