PdfDocumentFromFile Method

Opens an existing PDF document for editing.

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 2020.10.3
Syntax
public static PdfDocument FromFile(
	string PdfFilePath,
	string password = null,
	string ownerPassword = null
)

Parameters

PdfFilePath
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..).

Return Value

Type: PdfDocument
An IronPdf.PdfDocument object as loaded from the file path.
Exceptions
ExceptionCondition
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