Method Open
- Namespace
- SoftZenPdf
- Assembly
- SoftZenPdf.dll
Open(string, string?)
Opens a PDF file.
public static PdfReader Open(string path, string? password = null)
Parameters
pathstringThe file to read.
passwordstringFor encrypted files, the user or owner password. Files with an empty user password open without one.
Returns
- PdfReader
A reader over the file's contents; the file itself is not kept open.
Exceptions
- InvalidDataException
The file is not a PDF, or is damaged beyond repair.
- PdfPasswordException
The file is encrypted and the password is missing or wrong.
- NotSupportedException
The file uses an unsupported security handler or encryption revision.