Skip to content

Choosing the font and page for a plain text file

A .txt file carries words and line breaks and nothing else: no font, no page size, no margins. Turning it into a PDF means choosing those, and the right choice depends on what the text is. A note reads best in a proportional font at a comfortable size; a log, a script or anything lined up in columns needs a monospaced one, or the columns drift apart.

Updated

Which tool you need

  • A log file, source code or a table typed with spaces

    Keep the monospaced font, which Text to PDF starts with. Every character takes the same width, so columns and indentation line up on the page as they did in the editor.

  • A letter, notes or anything written as prose

    Switch to the sans font and relaxed line spacing. Proportional type is easier on the eye for sentences, and nothing in prose depends on columns.

  • The text uses headings, lists or links written in Markdown

    Markdown to PDF draws the # headings as headings and the lists as lists, rather than printing the symbols.

    Markdown to PDF

  • Rows of values separated by commas or tabs

    CSV to PDF sets them as a real table with a header row, which a monospaced text page cannot do once the values vary in length.

    CSV to PDF

Long lines and wide files

A line wider than the page is not cut off: it carries on underneath, starting at the same indentation, so a long log entry stays readable as one block. If many lines wrap, landscape or a smaller text size usually brings them back to one line each.

A form-feed character, which some older programs write between pages, starts a new page in the PDF, so a report that was paged for a printer keeps its breaks.

Sans or monospaced, and what each is drawn in

Monospaced pages are set in Courier, a face every PDF reader already carries, so it adds nothing to the size of the file. Sans pages are set in Noto Sans, and only the letters the text actually uses are stored in the PDF. Either way the text stays real text: it can be selected, searched and copied out again.

Courier covers English and the Western European languages and nothing more. A character it lacks, such as a Greek letter or a word of Hindi, is borrowed from Noto Sans, which is not monospaced, so a line holding one can sit a little out of step with the columns above and below it.

Which scripts the Fonts setting reaches

Light is built into the page and draws English, the Western European languages and Hindi. Medium, where the site starts, adds Greek, Cyrillic, Arabic, Hebrew, Thai and seven more Indian scripts, and Heavy adds Chinese, Japanese and Korean. A font above Light is fetched from this site only when your text needs it, and the request carries the font's name, never your text.

Emoji are in none of the levels, so they always come out as the replacement mark, as does any character above the level chosen. The choice is kept in this browser and shared with the site's other text-writing tools, so Heavy chosen here is still chosen on Watermark PDF.

What to know before you start

  • Emoji, and any script above the chosen Fonts level, appear as a replacement mark, counted before you create the PDF.
  • One file at a time, up to 20 MB of text.
  • Text only: a Word document or a PDF is not a text file and is refused.

Read next