This GitHub gist repository contains practical C# code snippets from the Environment Configuration chapter of Aspose.SVG for .NET documentation. These examples demonstrate how to customize runtime behavior using various service interfaces.
The examples in this repository cover key aspects of setting up an SVG processing environment:
- User Agent Service – Customize document encoding, user stylesheet, and primary character set.
- Runtime Service – Set timeouts to manage JavaScript execution time.
- Network Service – Intercept web requests by implementing custom message handlers.
- Message Handlers – Use
LogMessageHandlerto log unreachable resource requests. - Configuration Class – Central entry point to register and apply custom services.
Each gist is a self-contained example that you can copy and run in your .NET development environment.
- Make sure you have the Aspose.SVG for .NET library installed.
- Find the gist that corresponds to your specific task.
- Copy the C# code directly from the gist.
- Adjust file paths, input, and output parameters as needed.
- Run the code to see how environment configuration works.
- .NET Platforms: .NET Framework 4.6.1+, .NET Core 2.0+, or .NET 5.
- Supported OS: Windows, Linux, macOS.
- Development environment such as Visual Studio or JetBrains Rider.
- Aspose.SVG for .NET installed via NuGet.