Click or drag to resize
Pdf Library for .NET

PdfDocument(String) Constructor

Initializes a new instance of the PdfDocument class by loading a PDF from a file.

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public PdfDocument(
	string fileName
)

Parameters

fileName  String
The path to the PDF file to load.
Exceptions
ExceptionCondition
PdfDocumentExceptionThrown when the file cannot be opened or parsed as a PDF.
Example
PdfDocument document = new PdfDocument("input.pdf");
int pageCount = document.Pages.Count;
document.Close();
See Also