XFINIUM.PDF Documentation
EncryptFile(String,String,String,PdfSecurityHandler,Boolean) Method



Xfinium.Pdf.Utilities Namespace > PdfEncryptor Class > EncryptFile Method : EncryptFile(String,String,String,PdfSecurityHandler,Boolean) Method
Path to the input PDF file.
Password for the input file if it is encrypted, othewise null.
Path to the encrypted PDF file.
The security handler used for encryption.
If true then the internal structure of the output PDF file is compressed.
Encrypts the input PDF file and saves the encrypted file to output path.
Syntax
'Declaration
 
Public Overloads Shared Sub EncryptFile( _
   ByVal inputFileName As String, _
   ByVal inputPassword As String, _
   ByVal outputFileName As String, _
   ByVal securityHandler As PdfSecurityHandler, _
   Optional ByVal enableObjectCompression As Boolean _
) 
'Usage
 
Dim inputFileName As String
Dim inputPassword As String
Dim outputFileName As String
Dim securityHandler As PdfSecurityHandler
Dim enableObjectCompression As Boolean
 
PdfEncryptor.EncryptFile(inputFileName, inputPassword, outputFileName, securityHandler, enableObjectCompression)

Parameters

inputFileName
Path to the input PDF file.
inputPassword
Password for the input file if it is encrypted, othewise null.
outputFileName
Path to the encrypted PDF file.
securityHandler
The security handler used for encryption.
enableObjectCompression
If true then the internal structure of the output PDF file is compressed.
Requirements

Supported .NET Platforms: .NET 4.0 and higher, Windows Forms, ASP.NET, Windows Presentation Foundation 4.x, Silverlight 5, WinRT, Universal Windows Platform, Xamarin Mac, iOS & Android, Portable Class Library, .NET Core, .NET Standard


Target Platforms:Windows 10, Windows 8.1, Windows 8 , Windows 7, Windows Vista SP1 or later, Windows Server 2008, Windows Server 2008 R2

See Also

Reference

PdfEncryptor Class
PdfEncryptor Members
Overload List