Render SVG to XAML via .NET

.NET API to Export SVG to XAML on Windows, macOS, and Linux without using Microsoft® PowerPoint

 

Using a package of powerful File Format Automation APIs Aspose.Total for .NET you can easily Render SVG to XAML in two simple steps. By using PDF Processing API Aspose.PDF for .NET , you can transform SVG file format to PPTX. After that, by using Presentation Processing API Aspose.Slides for .NET , you can convert PPTX to XAML.

.NET API to Convert SVG to XAML

  1. Open SVG file using Document class
  2. Convert SVG to PPTX by using Save method
  3. Load PPTX file by using Presentation class
  4. Save the document to XAML format using Save method and set Xaml as SaveFormat

Get Started with .NET File Format APIs

Install from command line as nuget install Aspose.Total or via Package Manager Console of Visual Studio with Install-Package Aspose.Total.

Alternatively, get the offline MSI installer or DLLs in a ZIP file from downloads .

Document document = new Document("input.svg");
// save SVG as a PPTX 
document.Save("PptxOutput.pptx", SaveFormat.Pptx); 
// load PPTX with an instance of Presentation
Presentation presentation = new Presentation("PptxOutput.pptx");
// call save method while passing SaveFormat.Xaml
presentation.Save("output.xaml", SaveFormat.Xaml);   

Get XMP Metadata from SVG File via .NET

While converting SVG to XAML, you might need extra XMP metadata information to prioritize your batch conversion process. For example you can get and sort your conversion documents based on creation date and process the documents accordingly. Aspose.PDF for .NET allows you to access a SVG file’s XMP metadata. To get a SVG file’s metadata, you can create a Document object and open the input SVG file. After that, you can get the file’s metadata using the Metadata property.

Document doc = new Document("input.svg");
// get SVG XMP properties
Console.WriteLine(doc.Metadata["xmp:CreateDate"]);
Console.WriteLine(doc.Metadata["xmp:Nickname"]);
Console.WriteLine(doc.Metadata["xmp:CustomProperty"]);

Create Read Only XAML File via .NET

By using Aspose.Slides for .NET API, you can further enhance the features of your conversion application. One of the feature can be to create your output file read only to increase security. The API allows you to set your XAML file to Read-Only, which means users (after they open the presentation) see the Read-Only recommendation.

Presentation presentation = new Presentation("PptxOutput.pptx");
// make XAML read only
presentation.ProtectionManager.ReadOnlyRecommended = true;
// call save method while passing SaveFormat.Xaml
presentation.Save("output.xaml", SaveFormat.Xaml);     

Other Conversion Options

SVG TO PPT (Microsoft PowerPoint 97-2003)
SVG TO PPSM (Macro-enabled Slide Show)
SVG TO SWF (Shockwave Flash Movie)
SVG TO ODP (OpenDocument Presentation Format)
SVG TO OTP (OpenDocument Standard Format)
SVG TO PPTM (Macro-enabled Presentation File)
SVG TO PPSX (PowerPoint Slide Show)
SVG TO POTX (Microsoft PowerPoint Template Presentation)
SVG TO PPS (PowerPoint Slide Show)
SVG TO POTM (Microsoft PowerPoint Template File)
SVG TO POT (Microsoft PowerPoint Template Files)

SVG What is SVG File Format?

An SVG file is a Scalar Vector Graphics file that uses XML based text format for describing the appearance of an image. The word Scalable refers to the fact that the SVG can be scaled to different sizes without losing any quality. Text-based description of such files makes them independent of resolution. It is one of the most used formats for building a website and print graphics in order to achieve scalability. The format can only be used for two-dimensional graphics though. SVG files can be viewed/opened in almost all modern browsers including Chrome, Internet Explorer, Firefox, and Safari.

Read More

XAML What is XAML File Format?

XAML, Extensible Application Markup Language, extension files describe the user interface elements for software applications based on Windows Presentation Foundation (WPF). Though a language, it doesn’t require to be programmed as it is based on standard format of XML which is easy to use and understand. XAML (pronounced as “zammel”) was developed by Microsoft with specific aim for creating user interfaces. Its acronym original stood for Extensible Avalon Markup Language, where Avalon was the code-name for WPF. XAML files are sometimes saved with XOML extension as well.

Read More