/// <summary> /// Get all supported document formats /// </summary> public static void ShowAllSupportedFormats() { // Setup GroupDocs.Viewer config ViewerConfig config = Utilities.GetConfigurations(); // Create image or html handler ViewerImageHandler imageHandler = new ViewerImageHandler(config); // Get supported document formats DocumentFormatsContainer documentFormatsContainer = imageHandler.GetSupportedDocumentFormats(); Dictionary <string, string> supportedDocumentFormats = documentFormatsContainer.SupportedDocumentFormats; foreach (KeyValuePair <string, string> supportedDocumentFormat in supportedDocumentFormats) { Console.WriteLine(string.Format("Extension: '{0}'; Document format: '{1}'", supportedDocumentFormat.Key, supportedDocumentFormat.Value)); } Console.ReadKey(); }
public static void Run() { // Setup GroupDocs.Viewer config ViewerConfig config = new ViewerConfig(); config.StoragePath = @"C:\storage"; // Create image or html handler ViewerImageHandler imageHandler = new ViewerImageHandler(config); // Get supported document formats DocumentFormatsContainer documentFormatsContainer = imageHandler.GetSupportedDocumentFormats(); Dictionary<string, string> supportedDocumentFormats = documentFormatsContainer.SupportedDocumentFormats; foreach (KeyValuePair<string, string> supportedDocumentFormat in supportedDocumentFormats) { Console.WriteLine(string.Format("Extension: '{0}'; Document format: '{1}'", supportedDocumentFormat.Key, supportedDocumentFormat.Value)); } }