Class PdfException
The class represents general PDF exceptions. The PdfException inherited from the System.Exception class
Inheritance
System.Object
PdfException
Namespace: Syncfusion.Pdf
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfException : Exception
Examples
PdfLoadedDocument document;
try
{
//Load an existing document.
document = new PdfLoadedDocument("input.pdf");
}
catch (Syncfusion.Pdf.PdfException)
{
//Load an existing document.
document = new PdfLoadedDocument("input.pdf", true);
}
document.Save("Output.pdf");
document.Close(true);
'Load an existing document.
Dim document As PdfLoadedDocument
Try
document = New PdfLoadedDocument("input.pdf")
Catch exception As Syncfusion.Pdf.PdfException
document = New PdfLoadedDocument("input.pdf", True)
End Try
'Save and Close the document.
document.Save("Output.pdf")
document.Close(True)
Constructors
PdfException()
Initializes object by default error message.
Declaration
public PdfException()
Examples
PdfLoadedDocument document;
try
{
//Load an existing document.
document = new PdfLoadedDocument("input.pdf");
}
catch (Syncfusion.Pdf.PdfException)
{
//Load an existing document.
document = new PdfLoadedDocument("input.pdf", true);
}
document.Save("Output.pdf");
document.Close(true);
'Load an existing document.
Dim document As PdfLoadedDocument
Try
document = New PdfLoadedDocument("input.pdf")
Catch exception As Syncfusion.Pdf.PdfException
document = New PdfLoadedDocument("input.pdf", True)
End Try
'Save and Close the document.
document.Save("Output.pdf")
document.Close(True)
See Also
PdfException(String)
Initializes object by specified error message.
Declaration
public PdfException(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | User defined error message. |
PdfException(String, Exception)
Initializes object by specified error message and inner exception object.
Declaration
public PdfException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | User defined error message. |
System.Exception | innerException | The inner exception. |