Module 6 · 6.3
English
Office formats: OOXML, ODF and PDF
Module 6: Files and documents · Reading time: 10 minutes
Learning objective: After this lesson you can explain what docx, odt and pdf actually are, why a document can look different after a switch, and you choose the right format for collaboration, exchange and archiving.
Key concepts: file format, open standard, OOXML (docx, xlsx, pptx; ECMA-376, ISO/IEC 29500), ODF (odt, ods, odp; ISO/IEC 26300), old binary formats (doc, xls, ppt), pdf and PDF/A (ISO 19005), csv, font, metric-compatible font, conversion
A document is an agreement
A file is a row of bytes. Only through a file format does a program know what those bytes mean: this is a heading, this is bold, this is a table with three columns. If that format is publicly described and anyone can use it without permission or a licence, we call it an open standard (lesson 2.2). Then different programs can read and write the same file, and you're not dependent on a single maker.
For office documents there are two major open standards and one format for fixing content in place.
OOXML: docx, xlsx and pptx
Since Office 2007, Microsoft Office has saved documents by default as Office Open XML, OOXML for short. You know the extensions: docx, xlsx and pptx. The standard is laid down as ECMA-376 and as the international standard ISO/IEC 29500.
A docx is actually a zip file with a fixed layout. Rename a copy of offerte.docx to offerte.zip and unpack it. You'll then see, among other things:
[Content_Types].xml which parts it contains
word/document.xml the text and the formatting
word/styles.xml the styles
word/fontTable.xml the fonts the document uses
word/media/ the images
docProps/core.xml title, author, dateTwo things to know. First, ISO/IEC 29500 has a strict variant (Strict) and a looser one (Transitional) that also accommodates old Word quirks; Office writes the Transitional variant by default. Second, a docx can contain parts that only Microsoft Office understands, such as macros in VBA (in docm and xlsm), ActiveX buttons or add-ins. The format is open, but not everything that can be put inside it works everywhere. Lesson 6.5 covers that.
ODF: odt, ods and odp
The OpenDocument Format (ODF) was developed at the standards organisation OASIS and laid down as ISO/IEC 26300. The extensions are odt (text), ods (spreadsheet) and odp (presentation). An odt is also a zip file. The first part is called mimetype and literally contains the type of document, for example application/vnd.oasis.opendocument.text. The content is in content.xml, the styles in styles.xml.
ODF is the native format of LibreOffice and the packages built on it, such as Collabora Online. Many governments in Europe name ODF as their preferred format for exchange and archiving. In the Netherlands, ODF is on the "apply or explain" list of the Forum Standaardisatie (the Dutch standardisation body), alongside pdf and PDF/A.
Which format should you choose?
Both are open standards. The practical difference lies in who your people are and which program you use.
| Situation | Advice |
|---|---|
| You collaborate a lot with people who use Microsoft Office (clients, accountant) | docx, xlsx, pptx |
| Your online office works internally with OOXML (Euro-Office, ONLYOFFICE) | docx, xlsx, pptx: then nothing gets converted |
| Your online office works internally with ODF (Collabora Online, LibreOffice) | odt, ods, odp give the best fidelity; docx works too, but gets translated on every edit |
| Your government body or client asks for open standards for exchange | ODF or pdf |
| Something needs to be fixed in place: a quote, invoice, contract to sign | |
| Something needs to still be readable in ten years | PDF/A |
| Data for another program (accounting, webshop) | csv |
The most important rule: choose one main format per type and stick with it. Every time a file is converted back and forth (docx to odt to docx), something can shift.
Old formats: doc, xls and ppt
Files from before 2007 (doc, xls, ppt) are binary formats: not a zip with XML, but Microsoft's own file structure. Modern office packages still open them, but not always flawlessly, and they can contain macros without the extension giving that away. Advice when switching: convert old files you still use to docx, xlsx or pptx (or ODF) and keep the original as an archive copy.
Pdf and PDF/A
A pdf is meant to fix how something looks, the same on every device. Editing is possible, but isn't the point. PDF/A (ISO 19005) is a stricter variant for archiving: all fonts are embedded in the file, no external references or scripts are allowed, so the file remains readable on its own for many years. Choose PDF/A for anything you need to keep for a long time, such as annual accounts.
Why a document can look different
After a switch, colleagues quickly say: "it looks different". The cause is almost always the font. A document names its font (for example Calibri), but the font itself usually isn't embedded in it. The program displaying the document needs to have that font itself. If it doesn't, it picks a substitute, which has different letter widths. A line wraps differently, a table gets wider, a page shifts.
For the best-known Microsoft fonts there are open source metric-compatible substitutes: every letter is exactly the same width, only the shape differs slightly. Then your text flows the same way.
| In the document | Metric-compatible substitute |
|---|---|
| Calibri | Carlito |
| Cambria | Caladea |
| Arial | Liberation Sans |
| Times New Roman | Liberation Serif |
| Courier New | Liberation Mono |
Fonts such as Verdana, Tahoma, Georgia, Garamond, Century Gothic or your own house style font don't have such a substitute. An online office then has to replace them with something that looks similar, and the text can then reflow differently. At Bakkerij De Korrel, that was the house style font on the letterhead. The solution: have the font installed at the provider (if the licence allows it), or choose a free font in the template.
Other things that can shift with a format change: headers and footers with fields, tables of contents (have them refreshed), comments and tracked changes, embedded objects, and in spreadsheets conditional formatting and charts.
In practice: what it looks like at a provider
In Euro-Office in a WebOké Nextcloud you open docx, xlsx and pptx without conversion, and also odt, ods, odp, rtf, txt, csv and the old formats doc, xls and ppt. With File, Download as you can choose among others DOCX, ODT, PDF or PDF/A; with Save copy as the copy lands in your Nextcloud. For the five fonts in the table, the metric-compatible substitutes are installed on the server. Other online office packages have similar menus; which fonts they know varies by provider. Ask in advance if you use your own house style font.
Summary
- docx, xlsx and pptx (OOXML, ISO/IEC 29500) and odt, ods and odp (ODF, ISO/IEC 26300) are both open standards and both zip files with XML.
- Choose the format your office package uses internally and that your collaboration partners know, and stick with it.
- Convert old binary files (doc, xls, ppt); keep the original.
- Pdf to fix content in place, PDF/A to keep it for the long term.
- Shifts are usually caused by fonts; Calibri, Cambria, Arial, Times New Roman and Courier New have metric-compatible substitutes.
Quiz
Exercise
Exercise A6.3: Format and fonts of your own document. Upload a document you use often (for example your letter template). The program will tell you what format it actually is, which fonts it contains and whether a metric-compatible substitute exists for each font.
Further reading
The steps in these articles apply to WebOké's services; with other providers it works in a similar way.
- Euro-Office guide 1.4: Which browsers and file formats work with Euro-Office?
- Euro-Office guide 2.5: Download as docx, xlsx, pptx, odt or pdf
- Euro-Office guide 12.3: Fonts look different
- ISO/IEC 29500 and ECMA-376 (Office Open XML); ISO/IEC 26300 and OASIS OpenDocument 1.3 (ODF); ISO 19005 (PDF/A)
- Forum Standaardisatie (the Dutch standardisation body), list of open standards (ODF, PDF/A)
