PrintingOptionalDependencyGuard

PrintingOptionalDependencyGuard

Overview

PrintingOptionalDependencyGuard is a class in Aspose.PDF FOSS for .NET.

Guards the printing API’s optional platform dependency: on modern .NET the printing pipeline needs System.Drawing.Common, which ships as a NuGet package the consuming application must reference itself.

This class declares 2 methods for PrintingOptionalDependencyGuard objects in .NET programs. Available methods include: CreateException, EnsureDependenciesAvailable. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.

Methods

SignatureDescription
CreateException(innerException: Exception)Wrap a missing-dependency failure in an exception whose message tells the developer what to install.
EnsureDependenciesAvailable()Verify the optional printing dependency can be loaded, throwing the actionable exception from CreateException when it cannot.

See Also