ActiveReports.PdfExport Request technical support
PdfSecurity Class
See Also  Members   Example 


Encapsulates the information necessary to provide PDF document security and encryption.

Syntax

Visual Basic (Declaration) 
Public Class PdfSecurity 
Visual Basic (Usage)Copy Code
Dim instance As PdfSecurity
C# 
public class PdfSecurity 

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

If a user password is supplied, the viewer application should prompt for a password. If a user password is not supplied no password will be requested to open the document. By correctly supplying either the user password or the owner password, the user will be able to open the document, decrypt it and display it on the screen. Whether additional operations are allowed on a decrypted document depends on which password (if any) was supplied when the document was opened and on any access restrictions specified using this class's Permissions property.

Inheritance Hierarchy

System.Object
   DataDynamics.ActiveReports.Export.Pdf.PdfSecurity

See Also