List and print all supported file types

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.Viewer 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-viewer -- dnx GroupDocs.Viewer.Mcp --yes
Folders, licensing and more →

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:

using System;
using System.Collections.Generic;
using GroupDocs.Viewer;
// ...

// Get list of file types.
IEnumerable<FileType> supportedFileTypes = FileType.GetSupportedFileTypes();

// Display list of file types
foreach (FileType fileType in supportedFileTypes)
{
    Console.WriteLine(fileType);
}
Imports System
Imports System.Collections.Generic
Imports GroupDocs.Viewer
' ...

Module Program
    Sub Main(args As String())
        ' Get list of file types.
        Dim supportedFileTypes As IEnumerable(Of FileType) = FileType.GetSupportedFileTypes()
    
        ' Display list of file types
        For Each fileType As FileType In supportedFileTypes
            Console.WriteLine(fileType)
        Next
    End Sub
End Module
Zipped File (.zip)
Rar Compressed File (.rar)
Consolidated Unix File Archive (.tar)
Bzip2 Compressed File (.bz2)
Gnu Zipped File (.gz)
Gnu Zipped File (.gzip)
Drawing Exchange Format File (.dxf)
AutoCAD Drawing Database File (.dwg)
Stereolithography File (.stl)
Industry Foundation Classes File (.ifc)
[TRUNCATED]

Download full output