PdfDocument Constructor (Stream, String, String, Boolean)

Opens an existing PDF document for editing.

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 2020.10.3
public PdfDocument(
	Stream PdfDataStream,
	string Password = null,
	string OwnerPassword = null,
	bool GenerateUniqueDocumentIdentifiers = true


Type: System.IOStream
The PDF file data as a Stream.
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