public static void Run()
{
// ExStart:ExportTextAsShape
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_ModifyingAndConvertingImages();
using (Image image = Image.Load(dataDir + "Picture1.emf"))
{
EmfRasterizationOptions emfRasterizationOptions = new EmfRasterizationOptions();
emfRasterizationOptions.BackgroundColor = Color.White;
emfRasterizationOptions.PageWidth = image.Width;
emfRasterizationOptions.PageHeight = image.Height;
image.Save(dataDir + "TextAsShapes_out.svg", new SvgOptions
{
VectorRasterizationOptions = emfRasterizationOptions,
TextAsShapes = true
});
image.Save(dataDir + "TextAsShapesFalse_out.svg", new SvgOptions
{
VectorRasterizationOptions = emfRasterizationOptions,
TextAsShapes = false
});
}
// ExEnd:ExportTextAsShape
}
}