public static void Run() { string outputFolder = Constants.GetOutputDirectoryPath(); string outputFile = Path.Combine(outputFolder, "stl-converted-to.txt"); // Load the source STL file using (var converter = new GroupDocs.Conversion.Converter(Constants.SAMPLE_STL)) { WordProcessingConvertOptions options = new WordProcessingConvertOptions { Format = GroupDocs.Conversion.FileTypes.WordProcessingFileType.Txt }; // Save converted TXT file converter.Convert(outputFile, options); } Console.WriteLine("\nConversion to txt completed successfully. \nCheck output in {0}", outputFolder); }
public static void Run() { string outputFolder = Constants.GetOutputDirectoryPath(); string outputFile = Path.Combine(outputFolder, "jpeg-converted-to.xls"); // Load the source JPEG file using (var converter = new GroupDocs.Conversion.Converter(Constants.SAMPLE_JPEG)) { SpreadsheetConvertOptions options = new SpreadsheetConvertOptions { Format = GroupDocs.Conversion.FileTypes.SpreadsheetFileType.Xls }; // Save converted XLS file converter.Convert(outputFile, options); } Console.WriteLine("\nConversion to xls completed successfully. \nCheck output in {0}", outputFolder); }
public static void Run() { string outputFolder = Constants.GetOutputDirectoryPath(); string outputFile = Path.Combine(outputFolder, "odp-converted-to.tex"); // Load the source ODP file using (var converter = new GroupDocs.Conversion.Converter(Constants.SAMPLE_ODP)) { PdfConvertOptions options = new PdfConvertOptions { Format = GroupDocs.Conversion.FileTypes.PdfFileType.Tex }; // Save converted TEX file converter.Convert(outputFile, options); } Console.WriteLine("\nConversion to tex completed successfully. \nCheck output in {0}", outputFolder); }
public static void Run() { string outputFolder = Constants.GetOutputDirectoryPath(); string outputFile = Path.Combine(outputFolder, "mpx-converted-to.ppt"); // Load the source MPX file using (var converter = new GroupDocs.Conversion.Converter(Constants.SAMPLE_MPX)) { PresentationConvertOptions options = new PresentationConvertOptions { Format = GroupDocs.Conversion.FileTypes.PresentationFileType.Ppt }; // Save converted PPT file converter.Convert(outputFile, options); } Console.WriteLine("\nConversion to ppt completed successfully. \nCheck output in {0}", outputFolder); }
public static void Run() { string outputFolder = Constants.GetOutputDirectoryPath(); string outputFile = Path.Combine(outputFolder, "bmp-converted-to.svg"); // Load the source BMP file using (var converter = new GroupDocs.Conversion.Converter(Constants.SAMPLE_BMP)) { ImageConvertOptions options = new ImageConvertOptions { Format = GroupDocs.Conversion.FileTypes.ImageFileType.Svg }; // Save converted SVG file converter.Convert(outputFile, options); } Console.WriteLine("\nConversion to svg completed successfully. \nCheck output in {0}", outputFolder); }
public static void Run() { string outputFolder = Constants.GetOutputDirectoryPath(); string outputFileTemplate = Path.Combine(outputFolder, "converted-page-{0}.jpg"); GroupDocs.Conversion.Contracts.SavePageStream getPageStream = page => new FileStream(string.Format(outputFileTemplate, page), FileMode.Create); // Load the source TXT file using (Converter converter = new GroupDocs.Conversion.Converter(Constants.SAMPLE_TXT)) { // Set the convert options for JPG format ImageConvertOptions options = new ImageConvertOptions { Format = GroupDocs.Conversion.FileTypes.ImageFileType.Jpg }; // Convert to JPG format converter.Convert(getPageStream, options); } Console.WriteLine("\nConversion to jpg completed successfully. \nCheck output in {0}", outputFolder); }
public static void Run() { string outputFolder = Constants.GetOutputDirectoryPath(); string outputFile = Path.Combine(outputFolder, "mbox-converted-{0}-to.pptx"); // Load the source MBOX file using (var converter = new GroupDocs.Conversion.Converter(Constants.SAMPLE_MBOX, fileType => fileType == EmailFileType.Mbox ? new MboxLoadOptions() : null)) { var options = new PresentationConvertOptions(); var counter = 1; // Save converted PPTX file converter.Convert( (FileType fileType) => new FileStream(string.Format(outputFile, counter++), FileMode.Create), options ); } Console.WriteLine("\nConversion to pptx completed successfully. \nCheck output in {0}", outputFolder); }
public static void Run() { string outputFolder = Constants.GetOutputDirectoryPath(); string outputFile = Path.Combine(outputFolder, "pst-converted-{0}-to.docx"); // Load the source PST file using (var converter = new GroupDocs.Conversion.Converter(Constants.SAMPLE_PST, fileType => fileType == PersonalStorageFileType.Pst ? new PersonalStorageLoadOptions() : null)) { var options = new WordProcessingConvertOptions(); var counter = 1; // Save converted DOCX file converter.Convert( (FileType fileType) => new FileStream(string.Format(outputFile, counter++), FileMode.Create), options ); } Console.WriteLine("\nConversion to docx completed successfully. \nCheck output in {0}", outputFolder); }
public static void Run() { string outputFolder = Constants.GetOutputDirectoryPath(); string outputFile = Path.Combine(outputFolder, "ost-converted-{0}-to.ppt"); // Load the source OST file using (var converter = new GroupDocs.Conversion.Converter(Constants.SAMPLE_OST, fileType => fileType == PersonalStorageFileType.Ost ? new PersonalStorageLoadOptions() : null)) { PresentationConvertOptions options = new PresentationConvertOptions { Format = GroupDocs.Conversion.FileTypes.PresentationFileType.Ppt }; var counter = 1; // Save converted PPT file converter.Convert( (FileType fileType) => new FileStream(string.Format(outputFile, counter++), FileMode.Create), options ); } Console.WriteLine("\nConversion to ppt completed successfully. \nCheck output in {0}", outputFolder); }