WIPIVERSE All articles

Document file format

A document file format is a text-based or binary file format used to store documents on a storage medium, particularly for use by computers. Because documents may contain plain text, rich formatting, images, page layout, metadata, or structured markup, a wide range of mutually incompatible document file formats have been developed. No single format is universally supported, and practical use typically involves choosing a format according to whether the document is intended for authoring, exchange, archival, or fixed-layout presentation.

General characteristics

Document file formats differ along several axes:

  • Encoding: Formats may be plain text (for example, ASCII or UTF-8 .txt), binary (for example, legacy Microsoft Word .doc), or a compressed package of structured markup (for example, .docx and .odt, which are ZIP containers holding XML parts).
  • Editability: Some formats are designed for authoring and revision, while page description languages such as PostScript and PDF are intended primarily for documents that a typical user should be able to create and read but not easily edit.
  • Standardization: Formats range from fully open, internationally standardized specifications to proprietary formats that are documented only partially or under vendor-specific terms.
  • Scope: Some formats represent a single content type, while compound documents combine multiple document formats within one file.

Standards and history

Examples of XML-based open standards include OpenDocument (ISO/IEC 26300) and the Strict and Transitional versions of Office Open XML (ISO/IEC 29500). DocBook is an XML-based format used for structured documentation such as manuals, books, and technical guides, which is then processed with stylesheets or toolchains to generate HTML, PDF, EPUB, or man pages. XHTML was an earlier document file format that was eventually incorporated into HTML5.

In 1993, the ITU-T attempted to establish a unified standard known as Open Document Architecture (ODA), described in ITU-T recommendations T.411 through T.421 and equivalent to ISO 8613, with the intention of replacing competing document file formats. The effort did not succeed.

Page description languages such as PostScript and PDF became the de facto standard for fixed-layout documents. From 2001 onward, a series of ISO/IEC standards for PDF were published, including ISO 32000 for the PDF specification itself. HTML, an open international standard (ISO/IEC 15445:2000), is also widely used as a document file format. The legacy default binary format used by Microsoft Word (.doc) became a widespread de facto standard for office documents, but it is a proprietary format and is not always fully supported by other word processors.

Common document file formats

The following list includes some of the more commonly used formats, with typical file extensions in parentheses:

  • ASCII, UTF-8 (.txt, others) — plain text encodings, which may use differing line endings depending on the originating system.
  • Microsoft Word (.doc, .docx) — a structural binary format (.doc) and an XML-based text format (.docx), both developed primarily by Microsoft and covered by the Microsoft Open Specification Promise.
  • Portable Document Format / PDF (.pdf) — a now standardized (ISO 32000), open format based on PostScript, developed by Adobe in 1992, capable of storing documents, forms, rich media, and graphics. Variants serve exchange, archival (PDF/A), accessibility (PDF/UA), engineering (PDF/E), and print (PDF/X, PDF/VT) purposes.
  • OpenDocument (.odt, .fodt) — an open, XML-based standard for office documents, including word processing documents, spreadsheets, presentations, and graphics.
  • Office Open XML (.docx, .xlsx, .pptx) — an XML-based standard for office documents, standardized as ECMA-376 and ISO/IEC 29500.
  • Rich Text Format (.rtf) — a proprietary format developed by Microsoft for cross-platform document interchange, supporting basic formatting.
  • HTML (.html, .htm) — a hypertext document format originally created for the World Wide Web, initially standardized by the W3C and currently developed by the WHATWG.
  • Markdown (.md) — a plain text markup language with several implementations, popular in blogs and content management systems.
  • TeX (.tex) — a plain text format for describing complex typesetting and page layouts, often used for mathematical, technical, and academic publications.
  • troff (.tmac, .man, others) — a typesetting markup language developed at Bell Labs from the original roff program for Unix.
  • DocBook (.dbk, .xml) — an XML-based format intended for technical documentation.
  • DjVu (.djv, .djvu) — a format designed primarily for scanned documents, especially those mixing text, line drawings, and images.
  • PostScript (.ps) — a page description and programming language designed by Adobe for printing, display systems, and document storage.
  • Open XML Paper Specification (.xps, .oxps) — an XAML-based page description format designed by Microsoft and later standardized by Ecma International as ECMA-388.
  • Pages (.pages) — a format used by Apple's Pages application as part of the iWork office suite.
  • WordPerfect (.wpd, .wp, .wp7) — a proprietary format now owned by Alludo for word processing documents.
  • Uniform Office Format (.uof, .uot, .uos, .uop) — a standardized, XML-based open format for office applications developed in China.
  • FictionBook (.fb2, .fb3) — an open, XML-based e-book format originating in Russia.
  • PalmDOC (.pdb) — a version of the PDB record database format used by Palm OS to store e-books and text documents for handheld devices.
  • Amigaguide (.guide) — a hypertext document format designed for the Amiga platform.
  • Scalable Vector Graphics (.svg) — an XML-based vector image format for two-dimensional graphics with support for animation and interactivity.
  • Text Encoding Initiative (.xml) — a primarily XML-based format for semantically marking up text, used mainly in the digital humanities.
  • OpenOffice.org XML (.sxw, .sxc, .sxd, .sxi, others) — an open, XML-based format for office documents, and the predecessor of OpenDocument.
  • Symbolic Link (.slk) — a plain text ASCII format created by Microsoft in the 1980s for exchanging data between spreadsheet applications.

Broader catalogues of document file types frequently also group spreadsheet formats, such as comma-separated values (CSV) and Microsoft Excel formats, together with word processing formats under the general heading of document file formats.

Interoperability

Because the numerous document file formats are largely incompatible, exchanging documents between applications can produce differences in layout, formatting, or available features. Word processors commonly support multiple formats and may convert documents to a preferred native format when opening them. Organizations that require long-term access often favor openly standardized formats, whereas fixed-layout formats such as PDF are frequently used when preserving the visual appearance of a document is more important than allowing further editing.

References

  • Wikipedia, "Document file format."
  • Wikipedia, "Comparison of Office Open XML and OpenDocument."
  • Adobe, "Document file format types and extensions."
Browse

More topics to explore

    Browse all articles