GroupDocs.Comparison Cloud REST APIs support document compare tools to compare source and destination files of supported formats to get high-quality output in quickly and reliably. To get a list of supported formats, You can use the below API.
Resource
The following GroupDocs.Comparison Cloud REST API resource has been used in the Supported File Formats example.
{"formats":[{"extension":".pdf","fileFormat":"Portable Document Format"},{"extension":".doc","fileFormat":"Microsoft Word"},{"extension":".docx","fileFormat":"Microsoft Word"},{"extension":".mobi","fileFormat":"Mobipocket"},{"extension":".xls","fileFormat":"Microsoft Excel"},{"extension":".xlsx","fileFormat":"Microsoft Excel"},{"extension":".ppt","fileFormat":"Microsoft PowerPoint"},{"extension":".pptx","fileFormat":"Microsoft PowerPoint"},{"extension":".vsd","fileFormat":"Microsoft Visio"},{"extension":".vsdx","fileFormat":"Microsoft Visio"},{"extension":".msg","fileFormat":"Microsoft Outlook Mail Message"},{"extension":".eml","fileFormat":"Microsoft Outlook Mail Message"},{"extension":".one","fileFormat":"Microsoft OneNote"},{"extension":".emlx","fileFormat":"Apple Mail"},{"extension":".ods","fileFormat":"OpenDocument Formats"},{"extension":".odp","fileFormat":"OpenDocument Formats"},{"extension":".otp","fileFormat":"OpenDocument Formats"},{"extension":".ots","fileFormat":"OpenDocument Formats"},{"extension":".odg","fileFormat":"OpenDocument Formats"},{"extension":".txt","fileFormat":"Plain Text File"},{"extension":".html","fileFormat":"HyperText Markup Language"},{"extension":".mhtml","fileFormat":"HyperText Markup Language"},{"extension":".dxf","fileFormat":"CAD Drawing File Format"},{"extension":".dwg","fileFormat":"CAD Drawing File Format"},{"extension":".bmp","fileFormat":"Image files"},{"extension":".jpg","fileFormat":"Image files"},{"extension":".jpeg","fileFormat":"Image files"},{"extension":".png","fileFormat":"Image files"},{"extension":".tiff","fileFormat":"Image files"},{"extension":".djvu","fileFormat":"Image files"},{"extension":".dcm","fileFormat":"Digital Imaging and Communications in Medicine"},{"extension":".epub","fileFormat":"Electronic publication"}]}
SDK example
The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.
Get List of Supported File Formats
usingSystem;usingGroupDocs.Comparison.Cloud.Sdk.Api;usingGroupDocs.Comparison.Cloud.Sdk.Client;namespaceGroupDocs.Comparison.Cloud.Examples.CSharp{// Get All Supported FormatsclassGet_All_Supported_Formats{publicstaticvoidRun(){varconfiguration=newConfiguration(Common.MyAppSid,Common.MyAppKey);varapiInstance=newInfoApi(configuration);try{// Get supported file formatsvarresponse=apiInstance.GetSupportedFileFormats();foreach(varentryinresponse.Formats){Console.WriteLine(string.Format("{0}: {1}",entry.FileFormat,string.Join(",",entry.Extension)));}}catch(Exceptione){Console.WriteLine("Exception while calling Comparison InfoApi: "+e.Message);}}}}
packageexamples.Supported_File_Formats;importcom.groupdocs.cloud.comparison.client.*;importcom.groupdocs.cloud.comparison.model.*;importjava.util.List;importcom.groupdocs.cloud.comparison.client.Configuration;importcom.groupdocs.cloud.comparison.api.*;importexamples.Utils;publicclassComparison_Java_Get_Supported_Formats{publicstaticvoidmain(String[]args){Configurationconfiguration=newConfiguration(Utils.AppSID,Utils.AppKey);InfoApiapiInstance=newInfoApi(configuration);try{FormatsResultresponse=apiInstance.getSupportedFileFormats();for(Formatformat:response.getFormats()){System.out.println(format.getFileFormat());}}catch(ApiExceptione){System.err.println("Exception while calling InfoApi:");e.printStackTrace();}}}
<?phpinclude(dirname(__DIR__).'\CommonUtils.php');try{$apiInstance=CommonUtils::GetInfoApiInstance();$response=$apiInstance->getSupportedFileFormats();echo'<b>Supported file formats<br /></b>';foreach($response->getFormats()as$key=>$format){echo$format->getFileFormat(),"(",$format->getExtension(),")<br />";}}catch(Exception$e){echo"Something went wrong: ",$e->getMessage(),"\n";}
// For complete examples and data files, please go to https://github.com/groupdocs-comparison-cloud/groupdocs-comparison-cloud-node-samples
global.comparison_cloud=require("groupdocs-comparison-cloud");global.clientId="XXXX-XXXX-XXXX-XXXX";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
global.clientSecret="XXXXXXXXXXXXXXXX";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
global.infoApi=comparison_cloud.InfoApi.fromKeys(clientId,clientSecret);try{letresponse=awaitinfoApi.getSupportedFileFormats();console.log("Formats count: "+response.formats.length);}catch(error){console.log(error.message);}
# Import modulesimportgroupdocs_comparison_cloudfromCommon_Utilities.UtilsimportCommon_Utilities;classComparison_Python_Get_Supported_Formats:@classmethoddefRun(self):# Create instance of the APIapi=Common_Utilities.Get_InfoApi_Instance()try:# Retrieve supported file-formatsresponse=api.get_supported_file_formats()# Print out supported file-formatsprint("Supported file-formats:")forfileformatinresponse.formats:print('{0} ({1})'.format(fileformat.file_format,fileformat.extension))exceptgroupdocs_comparison_cloud.ApiExceptionase:print("Exception when calling get_supported_comparison_types: {0}".format(e.message))
# Load the gemrequire'groupdocs_comparison_cloud'require'common_utilities/Utils.rb'classFile_Formatsdefself.Comparison_Ruby_Get_Supported_Formats()# Getting instance of the APIapi=Common_Utilities.Get_InfoApi_Instance()# Retrieve supported file-formats$response=api.get_supported_file_formats()# Print out supported file-formatsputs("Supported file-formats:")$response.formats.eachdo|format|puts("#{format.file_format} (#{format.extension})")endendend
// Create configuration and API instances
Configurationconfig=newConfiguration('YOUR_API_KEY','YOUR_API_SECRET');// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
InfoApiinfoApi=newInfoApi(config);try{// Get supported file formats
FormatsResultresponse=infoApi.getSupportedFileFormats();// Log supported file formats and their extensions
for(Formatformat:response.Formats){System.debug('File Format: '+format.FileFormat+', Extensions: '+String.join(format.Extension,', '));}}catch(Exceptione){System.debug('Error occurred while fetching supported file formats: '+e.getMessage());}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.