Get supported file formats

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Comparison MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-comparison -- dnx GroupDocs.Comparison.Mcp --yes
Folders, licensing and more →

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