---
title: "What is an ODF text document?"
url: https://recursiveai.org/onedocument/articles/what-is-an-odf-text-document/
description: "An ODF text document is usually an ODT file: a ZIP of XML files in ODF (OpenDocument Format). Use OTT for a template or FODT for a single XML file."
date: 2026-11-19
author: OneDocument team
---

# What is an ODF text document?

An ODF text document is usually an ODT file: a ZIP of XML files in ODF (OpenDocument Format). Use OTT for a template or FODT for a single XML file.

November 19, 2026 · OneDocument team · Updated · November 19, 2026

[OneDocument](https://recursiveai.org/onedocument/) is Recursive AI’s free, open-source .NET library ([MIT or Apache-2.0](https://licenses.nuget.org/MIT%20OR%20Apache-2.0)). It [reads and writes ODT, OTT, and FODT](https://github.com/recursive-ai-oss/onedocument-csharp/blob/a85720e075c783fc596641d8586ee126cae088c5/docs/odf.md#L43-L52). [NuGet](https://www.nuget.org/packages/RecursiveAI.OneDocument.Documents/1.0.0) · [GitHub](https://github.com/recursive-ai-oss/onedocument-csharp) · [Docs](https://recursiveai.org/onedocument/docs/)

*Install · .NET 10*

```
dotnet new console
dotnet add package RecursiveAI.OneDocument.Documents --version 1.0.0
```

Download [`features.fodt`](https://raw.githubusercontent.com/recursive-ai-oss/onedocument-csharp/a85720e075c783fc596641d8586ee126cae088c5/testdata/odf/features.fodt) into the project folder and keep its original name.

Replace `Program.cs` and run `dotnet run`.

*Program.cs*

```
using RecursiveAI.OneDocument.Documents;
 
using var doc = Document.Open("features.fodt");
Console.WriteLine(doc.Format);
```

*Output*

```
Fodt
```

## What’s the difference between ODT, OTT, and FODT?

ODT and OTT normally use the same kind of ZIP container, but the media type inside says whether the package holds a document or a template. FODT puts the document and its styles in a single XML file instead. The [ODF package specification](https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part2-packages/OpenDocument-v1.3-os-part2-packages.html) defines the package format; OneDocument’s [ODF notes](https://github.com/recursive-ai-oss/onedocument-csharp/blob/a85720e075c783fc596641d8586ee126cae088c5/docs/odf.md#L7-L15) describe how it reads both forms.

[LibreOffice Writer](https://help.libreoffice.org/latest/en-US/text/shared/00/00000021.html) saves ODT by default, [Microsoft Word](https://support.microsoft.com/en-us/office/differences-between-the-opendocument-text-odt-format-and-the-word-docx-format-d9d51a92-56d1-4794-8b68-5efb57aebfdc) can open it, and [Google Docs](https://developers.google.com/workspace/drive/api/guides/manage-uploads#import-docs) can import it.

ODS is an OpenDocument spreadsheet and ODP is an OpenDocument presentation. They belong to the same family, but they don’t hold the same kind of content. DOCX is a word-processing format too, but it belongs to Office Open XML, not OpenDocument. Both ODT and DOCX are normally ZIP packages, so seeing a ZIP header isn’t enough to tell them apart.

## How can you tell what format the file really is?

OneDocument’s `Document.Open` identifies an ODF text document from the `mimetype` entry in a package or the `office:mimetype` attribute in flat XML. The extension isn’t used for this decision. Encrypted ODF packages aren’t supported: they raise `OfficeUnsupportedException` ([ODF read behavior](https://github.com/recursive-ai-oss/onedocument-csharp/blob/a85720e075c783fc596641d8586ee126cae088c5/docs/odf.md#L33-L49)).

For the next example, copy `features.fodt` to `sample.bin`. The new extension hides the file type from its name, but the root element still has `office:mimetype="application/vnd.oasis.opendocument.text"`.

## Does saving keep the original bytes?

Replace `Program.cs` with this longer example and run `dotnet run` to compare an untouched save with a conversion.

*Program.cs · .NET 10*

```
using RecursiveAI.OneDocument.Documents;
 
// A copy of the pinned features.fodt fixture, renamed.
const string input = "sample.bin";
using var doc = Document.Open(input);
Console.WriteLine($"Detected: {doc.Format}");
Console.WriteLine($"Import loss entries: {doc.ImportLoss?.Items.Count ?? 0}");
 
doc.SaveAs("copy.fodt");
byte[] original = File.ReadAllBytes(input);
byte[] copy = File.ReadAllBytes("copy.fodt");
Console.WriteLine($"Untouched copy matches: {original.SequenceEqual(copy)}");
 
doc.SaveAs("converted.odt");
using var converted = Document.Open("converted.odt");
Console.WriteLine($"Converted to: {converted.Format}");
Console.WriteLine($"Export loss entries: {doc.ExportLoss?.Items.Count ?? 0}");
```

*Output*

```
Detected: Fodt
Import loss entries: 3
Untouched copy matches: True
Converted to: Odt
Export loss entries: 0
```

The three import entries are tracked formatting changes (the formatting itself stays), drawing shapes (their text stays), and linked pictures (not fetched).

With OneDocument, an untouched document saved in its original format gets its original bytes back. If you edit it, or change from FODT to ODT as above, the exporter builds the output from OneDocument’s internal DOCX model. That means an untouched copy and a converted file can differ even when you haven’t changed the text ([save behavior](https://github.com/recursive-ai-oss/onedocument-csharp/blob/a85720e075c783fc596641d8586ee126cae088c5/docs/odf.md#L43-L52)).

`ImportLoss` records what didn’t map into that model. For example, embedded charts can keep only their preview image. `ExportLoss` records losses from writing the model out to ODF; an equation, for example, can become linear text. The example counts report entries, not affected objects. Zero export entries don’t undo the three import entries, and those import entries don’t stop an untouched copy from preserving the original bytes ([import and export mappings](https://github.com/recursive-ai-oss/onedocument-csharp/blob/a85720e075c783fc596641d8586ee126cae088c5/docs/odf.md#L77-L93)).
