This gist collection contains C# examples from the Environment Configuration chapter of the Aspose.SVG for .NET documentation. Learn how to configure user styles, character encoding, custom fonts, JavaScript timeouts, and network error logging during SVG processing and conversion.
These examples cover key aspects of configuring an SVG processing environment:
- User Agent Service – Configure custom styles, character encoding, and font lookup folders.
- Runtime Service – Limit JavaScript execution time during SVG processing.
- Network Service – Intercept requests and handle external resource loading errors.
- Custom Message Handlers – Log unreachable SVG resources with
LogMessageHandler. - SVG Conversion Configuration – Apply environment settings when converting SVG to PDF or PNG.
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.
You can download a free trial of Aspose.SVG for .NET and use a temporary license for unrestricted access.
- .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.