Click or drag to resize
Pdf Library for .NET

LicenseException Class

Thrown when LicenseKey is set to a value that cannot be decoded, does not match this product, targets an older major version, or has expired. All license-related failures surface as this single type; host code can switch on Message to distinguish causes.
Inheritance Hierarchy
SystemObject
  SystemException
    SelectPdf.UniversalLicenseException

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

The LicenseException type exposes the following members.

Constructors
 NameDescription
Public methodLicenseException(String)Initializes a new LicenseException with the specified message.
Public methodLicenseException(String, Exception)Initializes a new LicenseException with a message and an inner exception.
Top
Example
try
{
    SelectPdf.Universal.GlobalProperties.LicenseKey = "invalid-key";
    new SelectPdf.Universal.HtmlToPdf().ConvertUrl("https://www.google.com");
}
catch (SelectPdf.Universal.LicenseException ex)
{
    System.Console.WriteLine(ex.Message);
}
See Also