Get supported file formats
Leave feedback
On this page
GroupDocs.Comparison allows you to get the list of all supported file formats. To do this, follow these steps:
- Call the
getSupportedFileTypes
method of theFileType
class. - Enumerate through the collection of the
FileType
objects.
The following code snippet shows how to obtain a list of supported file formats:
import groupdocs.comparison as gc
def run():
try:
# Retrieve the supported file types
supported_file_types = gc.result.FileType.get_supported_file_types()
for file_type in sorted(supported_file_types, key=lambda x: x.extension):
print(file_type)
print("\nSupported file types retrieved successfully.")
except Exception as error:
print("An error occurred while retrieving supported file types:", error)
The result is as follows:
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.