Merge SVG to PNG in C#

Powerful cross-platform .NET API for merging SVG to PNG images using C# code on NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms

Merge SVG to PNG using Aspose.Slides

Aspose.Slides for .NET is a powerful .NET library used to merge and manipulate presentations, images, and other files. When you merge SVG to PNG, you are effectively combining SVG images to get a PNG picture.

Merge SVG to PNG in C#

Using Aspose.Slides for .NET , you can merge SVG to PNG files quickly with just a few lines of code

C# code for merging SVG to PNG

using (Presentation pres = new Presentation())
    ISvgImage svgImage = new SvgImage("doc.svg");
    IPPImage image = pres.Images.AddImage(svgImage);
    pres.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 0, 0, 360, 540, image);

    ISvgImage svgImage2 = new SvgImage("doc.svg");
    IPPImage image2 = pres.Images.AddImage(svgImage);
    pres.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 360, 0, 360, 540, image2);

    pres.Slides[0].GetThumbnail(new Size(960, 720)).Save("MergedFile.png", ImageFormat.Png);

How to merge SVG to PNG in C#

  1. Install Aspose.Slides for .NET. See Installation .

  2. Add the library as a reference in your project.

  3. Create an instance of the Presentation class.

  4. Load the SVG files you want to merge together.

  5. Save the resulting PNG image.

Merge PDF Files Online

How to Merge PDF in Python

Merge other files

You can also combine files in other formats to get a single file