Click or drag to resize
PDFDocumentAddPassword Method (String, String, PasswordSetting)
Add a password to a plain PDF file.

Namespace: RasterEdge.XDoc.PDF
Assembly: RasterEdge.XDoc.PDF (in RasterEdge.XDoc.PDF.dll) Version: 9.8.7.60526 (9.8.7.60526)
Syntax
public static int AddPassword(
	string filePath,
	string outFilePath,
	PasswordSetting passwordSetting
)

Parameters

filePath
Type: SystemString
A plain PDF file without encrypt data.
outFilePath
Type: SystemString
passwordSetting
Type: RasterEdge.XDoc.PDFPasswordSetting

Return Value

Type: Int32
Error Code. Return 0 for successful; -1 for failed; -2 for the input file has been encrypted.
See Also