PdfDocument Constructor (Byte, String, String, Boolean)

Opens an existing PDF document for editing.

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 2020.10.3
public PdfDocument(
	byte[] PdfData,
	string Password = null,
	string OwnerPassword = null,
	bool GenerateUniqueDocumentIdentifiers = true


Type: SystemByte
The PDF file data as byte array.
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.
See Also
Download DLL or Install with Nuget