Spread Windows Forms 12.0 Product Documentation
PdfSecurity Constructor(String,String,PdfPermissions)
Example 


FarPoint.PDF Assembly > FarPoint.PDF Namespace > PdfSecurity Class > PdfSecurity Constructor : PdfSecurity Constructor(String,String,PdfPermissions)
The password, that upon being entered, permits the viewer unrestricted access to the document.
The password, that upon being entered, permits the viewer the permissions as specified in this class's Permissions property.
The initial Permissions value for this object.
Initializes an instance of the PdfSecurity class with the specified passwords and permissions.
Syntax
'Declaration
 
Public Function New( _
   ByVal ownerPassword As String, _
   ByVal userPassword As String, _
   ByVal permissions As PdfPermissions _
)
'Usage
 
Dim ownerPassword As String
Dim userPassword As String
Dim permissions As PdfPermissions
 
Dim instance As New PdfSecurity(ownerPassword, userPassword, permissions)
public PdfSecurity( 
   string ownerPassword,
   string userPassword,
   PdfPermissions permissions
)

Parameters

ownerPassword
The password, that upon being entered, permits the viewer unrestricted access to the document.
userPassword
The password, that upon being entered, permits the viewer the permissions as specified in this class's Permissions property.
permissions
The initial Permissions value for this object.
Example
This example saves to a PDF file.
// Define the printer settings
FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
printset.Header = "Print Job For /nFPT Inc.";
printset.Footer = "This is Page /p/nof /pc Pages";
printset.HeaderHeight = 30;
// Assign the printer settings to the sheet and print to PDF
printset.PdfSecurity = new FarPoint.PDF.PdfSecurity("test", "test1", FarPoint.PDF.PdfPermissions.AllowPrint);
printset.PrintToPdf = true;
printset.PdfFileName = "C:\\results.pdf";
fpSpread1.Sheets[0].PrintInfo = printset;
fpSpread1.PrintSheet(0);
Dim printset As New FarPoint.Win.Spread.PrintInfo
printset.Header = "Print Job For /nFPT Inc."
printset.Footer = "This is Page /p/nof /pc Pages"
printset.HeaderHeight = 30
' Assign the printer settings to the sheet and print to PDF
printset.PdfSecurity = New FarPoint.PDF.PdfSecurity("test", "test1", FarPoint.PDF.PdfPermissions.AllowPrint)
printset.PrintToPdf = True
printset.PdfFileName = "C:\results.pdf"
FpSpread1.Sheets(0).PrintInfo = printset
FpSpread1.PrintSheet(0)
See Also

Reference

PdfSecurity Class
PdfSecurity Members
Overload List