Click or drag to resize

PdfViewerLoadDocument Method (String, String)

Open and load a PDF document from a file.

Namespace:  Patagames.Pdf.Net.Controls.WinForms
Assembly:  Patagames.Pdf.WinForms (in Patagames.Pdf.WinForms.dll) Version: 4.57.2704
Syntax
public void LoadDocument(
	string path,
	string password = null
)

Parameters

path
Type: SystemString
Path to the PDF file (including extension)
password (Optional)
Type: SystemString
A string used as the password for PDF file. If no password needed, empty or NULL can be used.
Exceptions
ExceptionCondition
UnknownErrorExceptionunknown error
PdfFileNotFoundExceptionfile not found or could not be opened
BadFormatExceptionfile not in PDF format or corrupted
InvalidPasswordExceptionpassword required or incorrect password
UnsupportedSecuritySchemeExceptionunsupported security scheme
PdfiumExceptionError occured in PDFium. See ErrorCode for detail
NoLicenseExceptionThis exception thrown only in trial mode if document cannot be opened due to a license restrictions"
Remarks
Note Note
With the trial version the documents which size is smaller than 1024 Kb, or greater than 10 Mb can be loaded without any restrictions. For other documents the allowed ranges is 1.5 - 2 Mb; 2.5 - 3 Mb; 3.5 - 4 Mb; 4.5 - 5 Mb and so on.
See Also