Document Formats
By the Syncfusion DevTutorials team · Last updated
Save and export documents as DOCX, PDF, TXT, HTML, RTF, ODT, and templates, then prepare a flyer in the Chapter 8 project.
The same document can be saved in many different formats, and each one suits a different job: one for editing, one for sharing, one for websites, one for reuse. In this lesson, you'll learn the main formats, what each keeps and loses, and how to export to them. At the end, you'll prepare and export a flyer in the Chapter 8 project.
Open the Word sandbox and follow along. In the sandbox, every format is under File > Export. In Microsoft Word, use File > Save As (or Export) and choose from the Save as type list.
Word documents (DOCX)
Start with the format you already know. .docx is Word's own format, and the default.
- Keeps everything: text, formatting, styles, tables, pictures, headers, comments, and tracked changes.
- Opens in Microsoft Word, Google Docs, LibreOffice, and the sandbox.
- Use it whenever you, or someone else, will keep editing the document.
Always keep a .docx copy of your work. Other formats are for sharing or special jobs. If you only have a PDF, making changes later is hard.
PDF files
When you're done editing and ready to share, the most common choice is PDF. PDF (Portable Document Format) is the standard for sharing finished documents.
- Looks exactly the same on every computer, phone, and printer: same fonts, same layout, same page breaks.
- Hard to change by accident, so it's ideal for resumes, invoices, forms to print, and final reports.
- Not meant for editing.
Export as PDF
Here are the ways to make a PDF:
- In the sandbox: File > Export > PDF (*.pdf). The PDF downloads to your computer.
- In Microsoft Word: File > Export > Create PDF/XPS, or File > Save As and choose PDF in Save as type.
- From any program: print and choose Save as PDF as the printer (Lesson 21).
In the sandbox, PDF, HTML, RTF, and OpenDocument exports are made by Syncfusion's online conversion service, so you need an internet connection for them. Word (.docx), template (.dotx), and plain text (.txt) exports are made right in your browser.
Text files (TXT)
PDF keeps the look of your document, but sometimes you want only the words. .txt is plain text: just the characters, with no formatting at all.
- Bold, fonts, colors, tables, pictures, headers, and page layout are all lost.
- Opens in any program on any device, even very old or very simple ones.
- Use it when you only need the words, for example to paste into a website form, a code editor, or an email.
HTML files
.html is the format of web pages.
- Keeps headings, paragraphs, lists, links, basic formatting, and tables.
- Page layout (margins, page breaks, headers and footers) doesn't apply, because web pages don't have pages.
- Use it when the content will be published on a website or opened in a browser.
Rich Text Format (RTF)
.rtf is an older format that almost every word processor can open.
- Keeps most text formatting: fonts, bold, italic, alignment, and simple tables.
- Newer features, like some styles and content controls, can be lost.
- Use it when sharing with someone whose program can't open
.docx.
OpenDocument Format (ODT)
.odt is the OpenDocument Text format, an open standard used by LibreOffice and OpenOffice Writer, and supported by Microsoft Word and Google Docs.
- Keeps most formatting and layout.
- Some complex Word features can look slightly different.
- Use it when sharing with LibreOffice users, or when an organization requires open formats.
Templates
The last format works differently from the rest. A template (.dotx) is a reusable starting point. When you open a template, you get a new, untitled document based on it, and the template itself stays unchanged.
Templates are perfect for documents you make again and again: letters on company letterhead, weekly reports, invoices, and meeting agendas.
To make a template:
- Set up the document: page layout, header and footer, styles, and any text that's always the same.
- In the sandbox: File > Export > Word Template (*.dotx).
- In Microsoft Word: File > Save As, and choose Word Template (*.dotx) in Save as type.
Microsoft Word also comes with many ready-made templates on the File > New screen: resumes, letters, flyers, and more.
Before you send any exported file, open it and check it. It takes a few seconds, and it's the only way to be sure the format kept what matters: a TXT has lost its formatting, an ODT may look slightly different, and a PDF should match the page exactly.
Which format should I use?
Here's the full list side by side:
| You want to… | Use |
|---|---|
| Keep editing the document | DOCX |
| Send a finished document that must look the same everywhere | |
| Get just the words, with no formatting | TXT |
| Put the content on a website | HTML |
| Share with an old or simple word processor | RTF |
| Share with LibreOffice users, or use an open format | ODT |
| Start new documents from the same design again and again | DOTX (template) |
Common mistakes
Here are the most common traps, and how to fix them:
| Mistake | What happens | How to fix it |
|---|---|---|
Saving only as .txt | All formatting, tables, and pictures are lost | Export again as .docx from your editor |
| Editing the template itself instead of a copy | The template is changed for everyone | Open the template to get a new document, then save that as .docx |
Sending a .docx resume | It may look different on the employer's computer | Send a PDF |
| Expecting page breaks in HTML | The web page is one long page | Use DOCX or PDF when pages matter |
| Not checking an RTF or ODT export | Some formatting changed and nobody noticed | Open the exported file and check it |
Exercise
Now it's time to export some formats yourself.
Click New in the sandbox title bar, and type these paragraphs:
Weekly ReportWeek ending:Highlights:
Make Weekly Report bold, size 18. Then do each task and press Check or Mark as done.
Chapter project
Put Chapter 8 together, with skills from earlier chapters. You'll design a one-page event flyer, check it is ready to print, and export it in the right formats.
Community clean-up flyer
What to remember
- DOCX keeps everything and is for editing. Always keep one.
- PDF looks the same everywhere and is for sharing finished work.
- TXT keeps only the words; HTML is for websites.
- RTF works with old or simple editors; ODT is the open format used by LibreOffice.
- A template (DOTX) is a reusable starting point that creates new documents.
- In the sandbox, every format is under File > Export.
That's the end of Chapter 8. In Chapter 9, you'll build forms and protect documents.