AI-friendly repository containing validated C# examples for Aspose.HTML for .NET API.
This repository provides working code examples demonstrating Aspose.HTML for .NET capabilities. All examples are automatically generated, compiled, and validated using the Aspose.HTML Examples Generator.
| Metric | Value |
|---|---|
| Total examples | 1802 |
| Categories | 18 |
| Target framework | net9.0 |
| Aspose.HTML version | 26.4.0 |
| Last updated | 2026-05-06 |
Examples are organized by feature category:
advanced_html_editing/- 37 example(s)data_extraction/- 81 example(s)epub_converter/- 143 example(s)extract_images_from_website/- 37 example(s)extract_svg_from_website/- 30 example(s)fine_tuning_converters/- 121 example(s)html_converter/- 198 example(s)html_navigation/- 120 example(s)markdown_converter/- 78 example(s)markdown_processing/- 119 example(s)message_handlers/- 98 example(s)mhtml_converter/- 107 example(s)save_file_from_url/- 28 example(s)svg_converter/- 105 example(s)web_accessibility/- 96 example(s)website_to_html/- 30 example(s)working_with_html_documents/- 329 example(s)working_with_html_templates/- 45 example(s)
Each category contains standalone .cs files that can be compiled and run independently.
- .NET SDK (net9.0 or compatible version)
- Aspose.HTML for .NET NuGet package (26.x.x)
- Valid Aspose license (for production use)
Each example is a self-contained C# file. To run an example:
cd <CategoryFolder>
dotnet new console -o ExampleProject
cd ExampleProject
dotnet add package Aspose.Html --version 26.x.x
# Copy the example .cs file as Program.cs
dotnet runusing Aspose.Html;
using (var document = new HTMLDocument("input.html"))
{
// Work with document
}using Aspose.Html.Converters;
using Aspose.Html.Saving;
Converter.ConvertHTML("input.html", new PdfSaveOptions(), "output.pdf");if (!File.Exists(inputPath))
{
Console.Error.WriteLine($"Error: File not found - {inputPath}");
return;
}
try
{
// Operations
}
catch (Exception ex)
{
Console.Error.WriteLine($"Error: {ex.Message}");
}- DOM-based processing using HTMLDocument
- Wrap IDisposable objects in using blocks
- Use Console.WriteLine / Console.Error
- Use Aspose.Html.Drawing instead of System.Drawing
- Use Converter API for format conversions
- Each example is independent and runnable
- Each category folder contains an
agents.md - Each category folder contains an
index.json - Root
AGENTS.mdprovides cumulative guidance - Root
index.jsonprovides full manifest
All examples use Aspose.HTML for .NET and require a valid license for production use. See licensing options.
This repository is maintained by automated code generation. Last updated: 2026-05-06