List and print all supported file types

The Supported file formats page lists all file formats supported by GroupDocs.Viewer.

To list or print out all the supported file formats within your application, follow these steps:

  1. Call the getSupportedFileTypes method of the FileType class.
  2. Enumerate the collection of the FileType objects.

The following code snippet shows how to list supported file formats in the console:

import com.groupdocs.viewer.FileType;
// ...

List<FileType> supportedFileTypes = FileType.getSupportedFileTypes();

for (FileType fileType : supportedFileTypes) {
    System.out.println(fileType);
}

The following image shows a sample console output: