# FileFormat

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Enums](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FileFormat/

File formats.

- **Full name:** `MFiles.FileFormat`
- **Proto file:** [`mfiles/enums.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/enums.proto)

<a id="values"></a>

## Values

| Name | Number | Description |
|---|---|---|
| <a id="v-FILE_FORMAT_NATIVE"></a>`FILE_FORMAT_NATIVE` | 0 | Native file format. |
| <a id="v-FILE_FORMAT_PDF"></a>`FILE_FORMAT_PDF` | 1 | PDF. |
| <a id="v-FILE_FORMAT_DISPLAY_ONLY_PDF"></a>`FILE_FORMAT_DISPLAY_ONLY_PDF` | 2 | PDF for display only (printing, copying, etc. disabled). |
| <a id="v-FILE_FORMAT_PLAIN_TEXT"></a>`FILE_FORMAT_PLAIN_TEXT` | 3 | Plain text (e.g., for full-text indexing or text analytics purposes). |
| <a id="v-FILE_FORMAT_MARKDOWN"></a>`FILE_FORMAT_MARKDOWN` | 4 | Markdown (structured text, e.g., for AI/agent consumption). |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCIndexingDataSource.CacheFileForIndexing](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/CacheFileForIndexing/index.md): Writes a file version, in the requested format, to a temporary folder on the server computer and returns its local path.
- [IRPCIndexingDataSource2.GetTextContentForFileForIX](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource2/GetTextContentForFileForIX/index.md): Gets the text that the server extracts from a file version for indexing, in the response.
- [IRPCObjectOperations.DownloadFile](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile/index.md): Not available over native gRPC: the server answers "Not implemented.". Used by the M-Files HTTP gateway.
- [IRPCObjectOperations.DownloadFileWithDownloadKey](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFileWithDownloadKey/index.md): Not available over native gRPC: the server answers "Not implemented.". Used by the M-Files HTTP gateway.
- [IRPCObjectOperations.DownloadFile_Begin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile_Begin/index.md): Opens a download session for a file version and returns its ID, the content size and, on request, its MD5 checksum.
- [IRPCObjectOperations.DownloadTempFileFromUpload_Begin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadTempFileFromUpload_Begin/index.md): Opens a download session for a committed upload, to read it back or as a PDF, without creating an object.
- [IRPCObjectOperations.GetTextContentForFileWithFormat](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetTextContentForFileWithFormat/index.md): Gets the text content of a file version as plain text or Markdown, and reports which format was produced.
- [IRPCObjectOperations.PrepareFile](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/PrepareFile/index.md): Prepares a PDF rendition of a file version and reports its size, extension and timestamp.

<a id="used-in-fields"></a>

## Used in fields

- [`CacheFileForIndexingCollectiveResponseElement.file_format`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.CacheFileForIndexingCollectiveResponseElement/index.md#f-file_format): The actual file format received.
- [`CacheFileForIndexingElement.file_format`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.CacheFileForIndexingElement/index.md#f-file_format): Specifies the requested file format to cache.
- [`CacheFileForIndexingRequest.file_format`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/CacheFileForIndexing/index.md#request): Specifies the requested file format to cache.
- [`CacheFileForIndexingResponse.file_format`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/CacheFileForIndexing/index.md#response): The format actually produced, which can differ from the requested one.
- [`GetTextContentForFileForIXRequest.file_format`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource2/GetTextContentForFileForIX/index.md#request): `FILE_FORMAT_PLAIN_TEXT` or `FILE_FORMAT_MARKDOWN`; unset (`FILE_FORMAT_NATIVE`) means plain text. A Markdown request falls back to plain text when the server cannot produce Markdown.
- [`GetTextContentForFileForIXResponse.file_format`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource2/GetTextContentForFileForIX/index.md#response): The format actually produced.
- [`PrepareFileRequest.fileformat`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/PrepareFile/index.md#request): `FILE_FORMAT_PDF` or `FILE_FORMAT_DISPLAY_ONLY_PDF`.
- [`DownloadFile_BeginRequest.format`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile_Begin/index.md#request): `FILE_FORMAT_NATIVE` (default), `FILE_FORMAT_PDF` or `FILE_FORMAT_DISPLAY_ONLY_PDF`.
- [`DownloadFileRequest.format`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile/index.md#request): Specifies the file format to download.
- [`DownloadFileWithDownloadKeyRequest.format`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFileWithDownloadKey/index.md#request): Specifies the file format to download.
- [`DownloadTempFileFromUpload_BeginRequest.file_format`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadTempFileFromUpload_Begin/index.md#request): `FILE_FORMAT_NATIVE` (default) or `FILE_FORMAT_PDF`.
- [`GetTextContentForFileWithFormatRequest.requested_format`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetTextContentForFileWithFormat/index.md#request): `FILE_FORMAT_MARKDOWN` or `FILE_FORMAT_PLAIN_TEXT`.
- [`GetTextContentForFileWithFormatResponse.format_produced`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetTextContentForFileWithFormat/index.md#response): The format of `text_content`.
