Migration Between Versions – Aspose.HTML for .NET
The Aspose.HTML for .NET API undergoes periodic refactoring and updates to enhance its functionality and adapt to evolving user requirements. Certain older classes are marked as deprecated as part of this evolution and eventually removed. This documentation chapter provides the information you need to know when migrating between Aspose.HTML for .NET versions – from deprecated versions to newer versions.
Aspose.HTML for .NET 24.2
In version 24.2, the IOutputStorage interface has been deprecated but will continue to work until version 24.5.0 is released. If you use earlier versions of Aspose.HTML for .NET, we recommend that you migrate to the new version, as version 24.5.0 will remove this deprecated interface.
Aspose.HTML for .NET 24.2 – Save HTML to a Stream – This article provides examples of using deprecated and new classes to save an HTML document to a memory stream and ZIP archive using 24.2 and earlier versions of the Aspose.HTML for .NET library. You’ll see the benefits and flexibility of the new features and get a set of C# examples.
Deprecated | New |
---|---|
IOutputStorage Interface | ResourceHandler Class |
Deadline for Deprecated Features
Deprecated features will continue to work until Aspose.HTML for .NET version 24.5.0 has been released.
Advantages of the New Features
The
ResourceHandler class in Aspose.HTML for .NET 24.2 replaces the deprecated IOutputStorage
interface.
- The
ResourceHandler
class streamlines resource management, offering a user-friendly HandleResource() method for creating and managing output streams. - This class interacts directly with resource objects and simplifies resource handling, providing explicit and straightforward functionality. Developers can extend the
ResourceHandler
class to customize resource handling behavior. - This new approach, leveraging
ResourceHandler
class, reduces the amount of boilerplate code when compared to the deprecatedIOutputStorage
interface, resulting in cleaner and more maintainable code.
Aspose.HTML for .NET 24.2 Release Notes
Aspose.HTML for .NET 24.10
In version 24.10, changes to the public API related to improving Linux support were completed. Several system enumerations of System.Drawing
, were replaced with our implementations in the Aspose.Html.Drawing
and Aspose.Html.Rendering.Image
namespaces:
- The FontStyle system enumeration was replaced with WebFontStyle one.
- The SmoothingMode system enumeration was replaced with ImageRenderingOptions.UseAntialiasing property.
- The TextRenderingHint system enumeration was replaced with TextOptions.UseHinting property.
Aspose.HTML for .NET 24.10 – Unified API and Enhanced Rendering Quality – This article introduces upgrades, replacing older system enumerations with new properties to enhance text clarity and image quality. Here, you will find C# examples of applying old and new properties using 24.10 and earlier versions of the Aspose.HTML for .NET library.
Advantages of the New Features
Changes to the public Aspose.HTML for .NET API in version 24.10 provide several advantages, particularly for Linux support. Here are the key benefits:
- The migration to
WebFontStyle
enumeration,UseAntialiasing
, andUseHinting
properties in Aspose.HTML for .NET 24.10 represents a step forward in supporting Linux environments. - This migration also aims to unify the public API to simplify access to the different versions of the Aspose.HTML for .NET library that support different HTML rendering engines.
- The base values of the
UseAntialiasing
andUseHinting
properties have been changed, resulting in better text rendering when using the default options.
Aspose.HTML for .NET 24.10 Release Notes
We appreciate our users’ support and willingness to update to the latest version. Your commitment to staying one step ahead guarantees access to advanced features and optimized performance. We appreciate your approach to using the latest advances. Thank you for being our user!
Aspose.HTML for .NET Team