Convert EMF or WMF to SVG Programmatically using C#

convert emf wmf to svg C#

WMF is abbreviated for Windows MetaFile while EMF is an improved version, known as Enhanced MetaFile. These metafiles are frequently used for printing purposes. You can easily convert EMF or WMF to SVG image file format as per your requirements. Let us walk through the following section for further details about these file conversions:

WMF or EMF to SVG Converter – API Installation

Aspose.Imaging for .NET API lets you create, manipulate, or edit WMF, EMF, and several other supported file formats. You can easily configure the API by downloading it from the Downloads section, or via NuGet gallery with the following installation command:

PM> Install-Package Aspose.Imaging

Convert WMF to SVG Programmatically in C#

You can convert WMF to SVG image programmatically using C# language in your .NET based applications. The following steps can be used for WMF to SVG image:

  1. Load input WMF file
  2. Initialize WmfRasterizationOptions class object
  3. Save output SVG image

The code snippet below elaborates how to convert WMF to SVG image programmatically using C#:

Convert EMF to SVG Programmatically using C#

EMF files can be efficiently converted to SVG file format. Please follow the below steps to perform EMF conversion:

  1. Load input EMF file
  2. Initialize EmfRasterizationOptions class object
  3. Set different properties
  4. Save output SVG image

The following code is based on these steps. It elaborates how to convert EMF to SVG programmatically using C#:

Save Text as Shapes during EMF to SVG Conversion using C#

The API can enable your applications to process the file formats for different use cases. You simply need to make some API calls without considering any underlying details of a file format. The API supports a lot of properties to control file conversion processes. For instance, you can save text as shapes during EMF to SVG image rendering. Simply follow the steps listed below:

  1. Load input EMF file
  2. Specify EmfRasterizationOptions instance
  3. Set the boolean property to render text as shapes
  4. Save output SVG file

The code below explains how to render text as shapes while converting EMF to SVG image file with C#:


We have learned how to convert or export the EMF and WMF files to SVG image files programmatically using C#. You can further explore the features by taking a look at Examples Project or API Documentation. We will appreciate your feedback and suggestions as you can write to us anytime at the Free Support Forums.

See Also

Convert EMF, WMF and SVG Images Programmatically using C#