Method FromBytes
- Namespace
- SoftZenPdf
- Assembly
- SoftZenPdf.dll
FromBytes(byte[], string?)
Reads a PDF from memory.
public static PdfReader FromBytes(byte[] data, string? password = null)
Parameters
databyte[]The complete file. It is copied, so the array may be reused afterwards.
passwordstringFor encrypted files, the user or owner password.
Returns
- PdfReader
A reader over the data.
Exceptions
- InvalidDataException
The data 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.