Skip to content
← All guides

How to convert a plain text or RTF file to PDF on a Mac

Turn .txt and .rtf files into PDFs on a Mac with TextEdit, or a whole folder at once with a Terminal command that comes with macOS.

The problem

Notes, logs or a simple letter live as text files, and you need them as PDFs to share or print.

How do I convert a text file to PDF on a Mac?

Open the file in TextEdit and choose File > Export as PDF. To change the font first, choose Format > Make Rich Text, select all, and pick a font.

Can I convert many text files to PDF at once?

Yes, with cupsfilter, which comes with macOS. One file:

cupsfilter notes.txt > notes.pdf

Every .txt file in a folder:

for f in *.txt; do cupsfilter "$f" > "${f%.txt}.pdf"; done

We ran it on a short agreement saved as text: it made a 15 KB PDF with the text selectable and searchable.

cupsfilter is for plain text. On Word and web page files it can write an empty PDF, so use Pages or the app they came from for those. See Word to PDF.

Our take

Use TextEdit when it matters how it looks, and cupsfilter when it matters that it is done. The command uses a plain typewriter style page; TextEdit lets you set the font and margins, which is worth it for anything a person will read rather than file.

In Simply PDF

Simply PDF's Convert takes Word, RTF, OpenDocument, web page, Markdown and text files and makes A4 or US Letter PDFs, several at a time. It needs a key.

Questions

How do I convert a text file to PDF on a Mac?

Open it in TextEdit and choose File > Export as PDF, or run cupsfilter file.txt > file.pdf in Terminal.

Can I convert many text files to PDF at once?

Yes. A short loop with cupsfilter in Terminal converts every .txt file in a folder.

More guides