Computer basics

Document formats: PDF, Word and plain text

A document format decides how your file opens on the other person machine: Word for a document that is meant to be edited, PDF for one that must look exactly the way you sent it, and plain text for one where only the words matter. The wrong choice rarely shows up on your own computer; it shows up on theirs.

  • Lesson 6 of 12
  • Beginner
  • Free, no signup

The four jobs that pick the document format for you

Each cell is a job, with the format that does that job written beside it.

  • It has to be edited

    DOCX. The only one of these four built for editing.

  • It has to look the way you sent it

    PDF, provided the fonts are embedded inside it.

  • It has to open years from now

    TXT. Nothing in it can break, because there is nothing in it but letters.

  • It has structure and goes somewhere else

    Markdown. A working format, not one you deliver to a client.

one document

These four cells settle the format, not the content. A bad document in the right format is still a bad document.

Last checked: Facts and tool names in this lesson are re-checked against their sources on this date.

What a document format actually is

A document format is the way your text, images and tables get packed inside one file. The extension at the end of the file name is only a label on that packing. Changing the label does not change the format, the same way renaming a box does not change what is inside it.

The real difference between formats is what each one is allowed to keep. A Word file keeps page layout, styles and tracked changes alongside the text. A PDF keeps the finished page instead. A text file keeps none of that and is only the letters themselves.

Here is a part people rarely mention: a modern Word file is itself a compressed archive. Microsoft own documentation describes a docx as a package of XML files and images zipped together. That is why a Word document with ten photos weighs roughly what those ten photos weigh, and why zipping it a second time takes almost nothing off.

Three document sheets: one with red pencil marks, one locked blue glass sheet and one plain green strip

Which format to send for which job

The right question is not which format is better. It is what this file is supposed to do. There are four common answers and each answer has a format.

If the other person has to change the text, send Word. If it must not change and must look the way you saw it, send PDF. If only the words matter and you want the file to still open in ten years, plain text is the safest choice, because it has almost nothing that can break. And if the text has structure but is going somewhere else, like whatever comes out of an AI tool, Markdown is what you end up holding.

FormatEditableFixed layoutSizeOpens everywhere
DOCXYes, that is its whole jobNo, it depends on fonts and software versionDepends on the images insideWord, Google Docs, LibreOffice
PDFNot really, not without a separate toolYes, if the fonts are embedded in itUsually more than the Word version of the same documentAny browser, any phone
TXTYes, in the simplest way there isNone, it has no layout at allThe smallestEverywhere, no exceptions
MarkdownYes, like plain textNone, it has structure rather than looksThe smallestEverywhere, though not everywhere prettily

A position not everyone shares: do not send a contract, a quote or a CV as a Word file. There are three reasons and the third one is rarely mentioned. First, its shape changes on the other machine. Second, anyone can quietly change a number in it. Third, a Word file carries its edit history and author name along with it, and that is usually not what you want travelling with your price.

One question before you send the file

Is the other person meant to change the text in this file?

Yes

Send Word

  • Embed the font inside the file so its shape survives.
  • Strip the author name and edit history before you send it.
No

Send PDF

  • Check the export with pdffonts; the emb column should read yes.
  • Select one word inside it. If nothing selects, the text is a picture.

This question settles the format only. Who gets the file and what they do with it is decided somewhere else.

Why your Word file falls apart on someone else machine

Because a Word file does not carry the font with it, only the font name. The other machine reads that name, does not have the font, and drops in the closest one it does have. The substitute has different letter widths, so lines shift, tables break, and a document that was two pages in your hands becomes two and a half in theirs.

In Persian this goes worse. Persian fonts differ a lot in line height and letter spacing, so the substitute Windows picks usually wrecks the document more than it would an English one. If your text also has Persian digits and the substitute font does not have them, you get empty boxes where the numbers were.

There is a fix and Microsoft documents it themselves: Word has a save option that embeds the font inside the file. It works, and it makes the file bigger. But if the document is not going to be edited, all of that is trouble for nothing: export a PDF and be done.

The Persian font trap inside a PDF

A PDF is supposed to lock the document down. It only does that when the fonts are embedded inside it. When they are not, the Word problem comes back, quieter this time, because on your own machine, which has the font, you see nothing wrong.

Three things can happen and we have seen all three on this server. One: the font is fully inside the file and the document opens the same everywhere. Two: the font name is there but the font is not, and the reader substitutes whatever it has. Three, which hits Persian speakers most: to dodge the font problem entirely, someone turned the text into a picture and put the picture inside the PDF. That file is flawless on every device, and in exchange not one word in it can be selected, copied or searched. To Google it is a blank page.

The good news is that checking takes ten seconds and needs no expensive software. The command line tool pdffonts, from the poppler package, prints the list of fonts inside any PDF. It has a column called emb that answers the question: yes means the font is in the file, no means it is not. And if the table prints empty, there are no fonts at all and your text is a picture.

A Persian PDF you can actually trust

PDF check sheetbefore sending

Signs it is sound

  • pdffonts prints at least one row.
  • The emb column reads yes on every row.
  • Text can be selected and copied with the mouse.
  • Searching for a Persian word inside the file finds it.

Signs of trouble

  • The pdffonts table is empty; the whole text is a picture.
  • One row has emb set to no; that part differs on every device.
  • Copying the text gives back broken, out of order letters.

This list is only about the file being sound. A technically flawless PDF can still be the wrong document.

Where Markdown came from and why it is suddenly everywhere

Markdown is a plain text file with a few punctuation conventions. Asterisks around a word mean bold, a hash at the start of a line means a heading, a dash at the start means a list item. John Gruber designed it in 2004 for exactly that: text that is readable before it is converted too.

The reason you keep running into it now is simple: AI tools write their output using those conventions. When you copy a chatbot answer, paste it into Word and the asterisks stay asterisks, it is because Word does not know that convention. That is not the tool being wrong, it is our expectation being wrong.

Our position on it is plain: Markdown is a working format, not a delivery format. For notes, drafts and anything that goes somewhere else later, it is excellent. For a client, an accountant or a government office, it is not. Send a PDF there.

The fast path, with AI

When you have a folder full of documents and no idea which of them are sound, opening them one by one is not work. Pull a report out of the files with one short loop first, then hand that report to a language model to turn into a task list. A fast, cheap model of the Flash class is enough here, and our current pick is listed in this site AI section. The trick is the emb column: that one column separates a PDF you can rely on from a fragile one, and no tutorial mentions it.

  1. Pull a report out of the folder. Run pdffonts once per PDF and collect the output into one text file. Write the file name beside each block, otherwise the report means nothing.
  2. Say where each document is going. Without that the model cannot tell which file is genuinely a problem, and it will only give you generic advice.
  3. Read what the model returns and verify it yourself on two or three files. The model reads the report; it never sees the file.

Copy-ready recipe

Pull the report from the folder:

  for f in *.pdf; do echo "== $f"; pdffonts "$f"; done > report.txt

The prompt, with the contents of report.txt attached:

  This is pdffonts output for a folder of documents. For each file tell me:
  1) Do all rows have emb=yes?
  2) If the table is empty the text is a picture; list those separately.
  3) Which files are not safe to send to {destination: client / office / archive} and why.
  Group the answer into three: sound, needs re-export, text is an image.
  Do not guess; if a row is ambiguous, write unclear.

Before you trust the output: The model only sees the report, never the document. A PDF being sound on fonts says nothing about the content being right, signed, or the latest version. Those three you have to open and check yourself. And no confidential document, from a contract or a payslip to a scanned ID, should be uploaded to any online tool just for this check; the pdffonts report carries no content out of the file, which is exactly why the recipe is built on it.

AI in this kind of work

On this topic a language model does not replace the decision; the rules are simple, they hold still, and this page has them. Where it genuinely helps is two jobs: summarising a long document you have to read, and tidying a report you pulled out of a folder yourself. And there is one job never to hand it, described below.

Tools that actually help

  • Gemini Notebook For when you have to understand one long document and the answers must come out of that document. Google own help says it works in the same 180 plus regions where the Gemini app works, and Iran is not on the supported-countries list for the Gemini apps.
  • Gemini For the mechanical pass over a report you pulled from the folder yourself, on its fast cheap model. Google own page says the Gemini web app runs in over 230 countries and territories, and Iran is not on that list.
  • LibreOffice Not an AI tool, and deliberately here: turning Word into PDF with the fonts embedded is the job of one free program and needs no model at all. The model decides, the program executes.
  • RGB The access and payment layer for Iran, kept separate from the tools themselves.

Where it backfires

Here is the job not to hand over: uploading a confidential document to a general purpose tool to convert or summarise it. A contract, a payslip, a scanned ID, once uploaded, is no longer only with you. Whether its content feeds model training depends on the plan and the settings of that service, and the companies write this down themselves: Google privacy page for the Gemini apps and Anthropic page on data used for training. That is exactly why the recipe above is built on pdffonts output rather than on the file. The second risk is smaller but more common: the model cannot see your file. Any answer of the shape "this PDF is fine" without the report in front of it is talk.

Sources: Google: Gemini Apps privacy Anthropic: is my data used for model training Where you can use the Gemini web app

Where this advice stops

This lesson is about sending documents between people, not about a document that needs a digital signature or legal standing. There the format is the smallest part of the story and the rules differ country by country. The table above is not absolute on size either: a PDF is usually bigger than the Word version of the same document, but with a document full of photos it can go the other way. And the emb column only tells you the font is in the file; it does not tell you the text was shaped correctly, and if the PDF producer laid Persian out badly, an embedded font will not fix that.

From our own work

We read three real files with pdffonts on this server on 2026-09-06, and between them they showed all three outcomes. First, a website design contract that has sat in the media library of one of our own sites since February 2019: pdffonts prints three rows, all named TimesNewRomanPSMT, two with emb set to yes and one with emb set to no. So part of that seven year old document is drawn on the reader machine with whatever they happen to have. Second, a Persian form that is mPDF output: three rows of MPDFAA+DejaVuSerifCondensed with emb and sub both yes, meaning the font is embedded and subset. The interesting part is that DejaVu is not a Persian font; a Persian document was printed in a typeface not built for it, and the PDF shows that. Third, a file we produced ourselves with Imagick and pango: pdffonts printed no rows at all and pdftotext returned no text, because the text had become a picture. The same reason we install the RGBirLegacy font as ttf on this server applies here and is written into the theme code: the GD library does not shape Persian at all, and the thing that works is Imagick with pango.

Real follow-up questions

If I rename the extension by hand, does the format change?

No. The extension is only a label and the content of the file stays untouched. The usual result is that the program refuses to open it or reports it as corrupt. To really change the format you have to open the file in a program and save or export it as the other format.

Why did my PDF come out bigger than the original Word file?

Usually for two reasons. First, the fonts are embedded inside the PDF and that alone weighs a few hundred kilobytes, especially with a Persian font, which carries a lot of glyphs. Second, some tools re-embed the images at a higher quality on export. If size matters, turn the image compression setting down in the export options.

Should I send a Google Docs link or a file?

A link is good for live shared work, a file for when the version has to stay fixed. One difference people usually learn late: a link disappears the moment you want it to or access is cut, while a file you sent is theirs forever. For contracts and quotes, send a PDF.