Encrypt an existing PDF
Namespace: pdf7.PdfWriter
Assembly: pdf7.PdfWriter (in pdf7.PdfWriter.dll) Version: 4.0.0.0 (4.0.1000.111)
Syntax
public static void EncryptPdf( string printerName, string inputFileName, string outputFileName, string ownerPassword, string userPassword, PdfUtilEncryptionType encryptionType, bool allowAssembly, bool allowCopy, bool allowDegradedPrinting, bool allowFillIn, bool allowModifyAnnotations, bool allowModifyContents, bool allowPrinting, bool allowScreenReaders )
Parameters
- printerName
- Type: SystemString
Name of PDF printer - inputFileName
- Type: SystemString
Full path of file to encrypt. - outputFileName
- Type: SystemString
Full path of output file. - ownerPassword
- Type: SystemString
Owner password for PDF encryption. - userPassword
- Type: SystemString
User password for PDF encryption. - encryptionType
- Type: pdf7.PdfWriterPdfUtilEncryptionType
Type and strength of encryption. - allowAssembly
- Type: SystemBoolean
Allow assembly. - allowCopy
- Type: SystemBoolean
Allow copy to clipboard. - allowDegradedPrinting
- Type: SystemBoolean
Allow degraded printing. - allowFillIn
- Type: SystemBoolean
Allow fill in. - allowModifyAnnotations
- Type: SystemBoolean
Allow modifying annotations. - allowModifyContents
- Type: SystemBoolean
Allow modifying contents. - allowPrinting
- Type: SystemBoolean
Allow printing. - allowScreenReaders
- Type: SystemBoolean
Allow screen readers.
See Also