Convert ODG files
Contents
[
Hide
]
Convert ODG files
Aspose.Imaging for .NET now supports converting images from open document graphics to PDF and other image formats. Following code snippet demonstrates the said functionality.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Aspose.Imaging; | |
using Aspose.Imaging.FileFormats.OpenDocument; | |
using Aspose.Imaging.ImageOptions; | |
using System.IO; | |
string templatesFolder = @"c:\Users\USER\Downloads\templates\"; | |
string dataDir = templatesFolder; | |
using (OdgImage image = (OdgImage)Image.Load(dataDir + "template.odg")) | |
{ | |
image.Save(dataDir + "result.pdf", new PdfOptions()); | |
} | |
File.Delete(dataDir + "result.pdf"); |