This gist repository contains advanced C# code samples for Aspose.HTML for .NET. These examples support the scenarios covered in the Advanced Programming section of the documentation and are intended for developers working with more complex HTML processing tasks.
This repository provides advanced usage examples of the Aspose.HTML for .NET API. You will explore:
- Custom Stream Processing. Implement custom stream providers to control how output is generated and stored in memory or files.
- Memory Stream Output. Render documents directly to memory streams for use in non-file-based workflows.
- Advanced DOM manipulation with Mutation Observer. You will learn how to register and observe changes in the HTML Document tree using MutationObserver.
- Aspose CSS Extension. Use Aspose-specific CSS properties to customize the layout of your printed document, such as adding headers, footers, and page numbers.
- Editing HTML5 Canvas Content. Work with a document that contains an HTML5 Canvas element and render visual HTML output to formats like PDF.
- Using the HTML Form Editor. Programmatically manipulate HTML forms in the document, input controls, and submission.
| Example | Description |
|---|---|
Example-SetPageMarginMarksUsingCssExtensions.cs |
Use CSS extensions to customize margin boxes in printed output. |
Example-CanvasRenderingContext2D.cs |
Create and render drawings using JavaScript canvas API. |
Example-ConvertHtml5CanvasToPdf.cs |
Modify canvas content and render it to a PDF. |
Example-FillAndSubmitHtmlForm.cs |
Automatically fill and submit form data. |
Example-MemoryStreamProvider.cs |
Save output documents in memory without writing to disk. |
Example-MutationObserver.cs |
Observe changes to the HTML DOM. |
Example-UsingCustomStreamProviderToConvertHtmlToJpeg.cs |
Use a custom stream provider for image output. |
- Add Aspose.HTML for .NET to your project.
- You can download a free trial of Aspose.HTML for .NET and use a temporary license for unrestricted access.
- Browse the available gists and copy the code samples you need.
- Configure paths, settings, and inputs to suit your environment.
- Documentation – Aspose.HTML for .NET
- Product page – Aspose.HTML for .NET
- Free Support Forum – Aspose.HTML
- Blog – Aspose.HTML Product Family
- API Reference – Aspose.HTML for .NET
- NuGet Package – Aspose.HTML for .NET
- .NET Platforms: .NET 5.0, .NET Framework 4.6.1+, or .NET Core 2.0+
- Supported OS: Windows, Linux, macOS
- Aspose.HTML for .NET library