ActiveReports.PdfExport Request technical support
UserPassword Property
See Also  Example


Sets or returns a user password string that can be entered when a user attempts to open the exported PDF in the reader. If this value is left empty, the user will not be prompted for a password, but will be restricted by the specified permissions.

Syntax

Visual Basic (Declaration) 
Public Property UserPassword As String
Visual Basic (Usage)Copy Code
Dim instance As PdfSecurity
Dim value As String
 
instance.UserPassword = value
 
value = instance.UserPassword
C# 
public string UserPassword {get; set;}

Return Value

String.

Example

C#Copy Code
PrivateAvoidAbtnExport_Click(ObjectAsender,ASystem.EventArgsAe)
{
AAAArptDataDynamicsArptA=AnewArptDataDynamics();
AAAADataDynamics.ActiveReports.Export.Pdf.PdfExportApA=AnewADataDynamics.ActiveReports.Export.Pdf.PdfExport();
AAAAp.Security.EncryptA=Atrue;
AAAAp.Security.OwnerPasswordA=A"Mortimer";
AAAAp.Security.UserPasswordA=A
"monkey";
AAAAp.Security.PermissionsA=ADataDynamics.ActiveReports.Export.Pdf.PdfPermissions.AllowPrint;
AAAAp.Security.Use128BitA=Atrue;
AAAArpt.Run();
AAAAthis.arv.DocumentA=Arpt.Document;
AAAAp.Export(rpt.Document,AApplication.StartupPathA+A
"\\p.pdf");
}
Visual BasicCopy Code
PrivateASubAbtnExport_Click(ByValAsenderAAsASystem.Object,AByValAeAAsASystem.EventArgs)AHandlesAButton2.Click
AAAADimArptAAsANewArptDD
AAAADimApAAsANewADataDynamics.ActiveReports.Export.Pdf.PdfExport
AAAAp.Security.EncryptA=ATrue
AAAAp.Security.OwnerPasswordA=A"Mortimer"
AAAAp.Security.UserPasswordA=A"monkey"
AAAAp.Security.PermissionsA=ADataDynamics.ActiveReports.Export.Pdf.PdfPermissions.AllowPrint
AAAAp.Security.Use128BitA=ATrue
AAAArpt.Run()
AAAAMe.Viewer1.DocumentA=Arpt.Document
AAAAp.Export(rpt.Document,AApplication.StartupPathA&A"\p.pdf")
EndASub

See Also