Home | Product Page | Docs | API Reference | NuGet | Blog | Search | Free Support | Temporary License
Aspose.SVG for .NET is an API for working with Scalable Vector Graphics (SVG) in .NET applications. It enables developers to programmatically create, load, edit, traverse, render, vectorize, save, and convert SVG documents without relying on external graphics tools.
This repository provides practical developer documentation and ready-to-run C# examples to help you integrate SVG processing into .NET applications.
This repository is organized to help you find what you need quickly:
| Directory | Description |
|---|---|
| Docs | Short developer guides and getting-started articles for Aspose.SVG for .NET. |
| Examples | Ready-to-run C# examples and shared sample data. |
The Docs and Examples folders are designed to be used together: documentation explains the concepts, while examples demonstrate working code.
Aspose.SVG for .NET covers common SVG workflows required in real-world .NET applications:
- Create and load SVG documents from files, streams, URLs, or memory strings.
- Edit SVG content using DOM APIs for elements, attributes, paths, styles, colors, and text.
- Traverse and inspect the SVG DOM using DOM navigation, CSS selectors, and XPath.
- Convert SVG to PDF for document publishing and reporting scenarios.
- Convert SVG to raster images such as PNG, JPEG, BMP, TIFF, and GIF.
- Save SVG as SVGZ for compressed SVG storage and delivery.
- Render SVG with configurable options such as page setup, background color, resolution, and image quality.
- Vectorize raster images and text into SVG paths.
- Build SVG programmatically with the SVG Builder API.
The API is designed for automation, batch processing, backend services, desktop applications, and server-side SVG workflows.
Aspose.SVG for .NET allows you to convert SVG files to PDF documents using a single API call. This approach is useful for server-side applications, reporting systems, and document generation workflows.
using Aspose.Svg.Converters;
using Aspose.Svg.Saving;
Converter.ConvertSVG("image.svg", new PdfSaveOptions(), "image.pdf");You can convert SVG documents to raster image formats by loading the SVG into an SVGDocument and applying ImageSaveOptions. This is useful for previews, thumbnails, and bitmap-based output.
using Aspose.Svg;
using Aspose.Svg.Converters;
using Aspose.Svg.Rendering.Image;
using Aspose.Svg.Saving;
using (var document = new SVGDocument("image.svg"))
{
var saveOptions = new ImageSaveOptions(ImageFormat.Jpeg);
Converter.ConvertSVG(document, saveOptions, "image.jpeg");
}Aspose.SVG for .NET supports image vectorization, allowing you to convert raster images such as PNG or JPEG into scalable SVG graphics.
using Aspose.Svg;
using Aspose.Svg.ImageVectorization;
var vectorizer = new ImageVectorizer();
using (SVGDocument document = vectorizer.Vectorize("flower.png"))
{
document.Save("flower.svg");
}-
Install Aspose.SVG for .NET using NuGet:
dotnet add package Aspose.SVG
Or use Visual Studio Package Manager Console:
Install-Package Aspose.SVG -
Review the Docs/getting-started section for installation, licensing, supported features, and supported file formats.
-
Explore the Examples folder to see common scenarios in action.
-
Use the API Reference for detailed class and method descriptions.
From the repository root, run a C# examples section:
dotnet run --project Examples\CSharp\CSharp.csproj -- --section WorkingWithSVGDocumentFor the full section list and Visual Studio launch profile instructions, see Examples/CSharp/README.md.
To contribute changes to this repository:
- Create a branch with the proposed changes.
- Update or add focused examples and documentation.
- Open a pull request for review.
If you encounter issues, have questions, or need technical assistance:
- Use the official documentation and API reference.
- Visit the Aspose.SVG support forum.
Aspose.SVG for .NET is a commercial library. You can start with a free evaluation and later apply a license for production use. Licensing details and instructions are available in the Licensing documentation.
Home | Product Page | Docs | API Reference | NuGet | Blog | Search | Free Support | Temporary License