Click or drag to resize
Pdf Library for .NET

PdfDocumentException Class

Represents errors that occur during PDF document operations (loading, saving, page manipulation, security, and rendering).
Inheritance Hierarchy
SystemObject
  SystemException
    SelectPdf.UniversalPdfDocumentException

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public class PdfDocumentException : Exception

The PdfDocumentException type exposes the following members.

Constructors
 NameDescription
Public methodPdfDocumentException(String) Initializes a new instance of the PdfDocumentException class with a specified error message.
Public methodPdfDocumentException(String, Exception) Initializes a new instance of the PdfDocumentException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Top
Example
try
{
    PdfDocument document = new PdfDocument("missing.pdf");
}
catch (PdfDocumentException ex)
{
    Console.WriteLine("PDF error: " + ex.Message);
}
See Also