PdfDocument Constructor (String, String, String, Boolean)

Opens an existing PDF document for editing.

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 2020.10.3
public PdfDocument(
	string PdfFilePath,
	string password = null,
	string ownerPassword = null,
	bool GenerateUniqueDocumentIdentifiers = true


Type: SystemString
The PDF file path.
password (Optional)
Type: SystemString
Optional user password if the PDF document is encrypted.
ownerPassword (Optional)
Type: SystemString
Optional password if the PDF document is protected by owner (printing, modifying restrictions etc..).
GenerateUniqueDocumentIdentifiers (Optional)
Type: SystemBoolean
if false, Guid is not generated inside PDF DOM and BinaryData for two identical PDF files will be the same. This is very useful for Unit Testing, especially comparing rendered PDFs for Equality.
IOExceptionException thrown if can not be opened.
ArgumentExceptionPdfFilePath is null, empty, or consists only of white-space characters.
See Also
Download DLL or Install with Nuget