ActiveReports.PdfExport Request technical support
Permissions Property
See Also  Example


Specifies the user permissions for the document. The PdfPermissions values can be combined using a bitwise OR combination.

Syntax

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

Return Value

PdfPermissions enumeration value.

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

Remarks

This property represents a binary OR, so it will only evaluate the last value given. Therefore, if you want to allow both printing and copying, both permissions must be set in the same line of code, i.e.
p.Permissions = AllowPrint | AllowCopy

See Also