Get supported file formats

On this page

GroupDocs.Comparison allows you to get the list of all supported file formats.

The following code snippet shows how to obtain a list of supported file formats and print them to the console.

'use strict';

// Import the GroupDocs.Comparison for Node.js via Java SDK
const groupdocs = require('@groupdocs/groupdocs.comparison');

// Get a collection of all supported file types
const fileTypes = groupdocs.FileType.getSupportedFileTypes();

// Iterate through the collection and print each supported format
let count = 0;
while (fileTypes.size() > count) {
  console.log(fileTypes.get(count).toString());
  count++;
}

// Exit the process when enumeration is complete
process.exit(0);

This example:

  1. Calls getSupportedFileTypes on the FileType class to retrieve supported formats.
  2. Iterates through the returned collection of FileType objects and writes their string representations to the console.

The result is as follows:

On this page

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.