Free

Free coded apps to suit all. No sign up, no email, usable offline, updates when I can, feedback welcome. Send feedback

How-to

Making a PDF from a text or Markdown file

Turn a plain text file into a tidy A4 PDF in Consolas, or a Markdown file into one with headings, lists, quotes, code blocks and links, all offline.

Making a PDF from a text or Markdown file

Plain text is everywhere. Log files, notes, README files, exported chat histories, configuration files and lists typed in Notepad. Markdown is its slightly fancier cousin, plain text with a few symbols for headings, lists and emphasis. Both are easy to write and awkward to send to someone who expects a proper document. PDF by Zaweba turns either into a PDF in one step.

Plain text files

A text file goes onto A4 pages in Consolas, a clear fixed-width font where every character takes the same space. That matters for text that relies on alignment, such as logs, tables made of spaces and code, because columns stay lined up exactly as they were in the editor.

Long lines are wrapped so nothing runs off the edge of the page. And if the file contains a form feed character, which some older programs and printers use to mean "start a new page", a new page begins there. Reports produced by older systems often use form feeds, so they come out paginated the way they were designed.

Markdown files

Markdown gets a richer treatment. Headings become headings, lists become lists and quotes are set apart. Code blocks keep their layout, and horizontal rules draw a line across the page. Within paragraphs, bold, italic, inline code and links are all handled.

That makes the Markdown route a quick way to produce a neat document from notes. Many people already write in Markdown for project documentation, meeting notes or drafts, and a PDF version is easy to hand to someone who does not use those tools.

Notes, logs and documentation

Sending notes to a colleague or client as a tidy document is the commonest. Write them in whatever editor you like, keep them as Markdown and make a PDF when you need to share.

Archiving logs and records is another. A PDF of a log file is fixed, easy to attach to an email and readable on any device, while the original stays as it was.

Documentation is a third. A README or guide written in Markdown can become a PDF to include with a download or print for a desk.

Writing sources that convert cleanly

Keep Markdown simple. Standard headings, lists, quotes and code blocks come out well. If you rely on unusual extensions from a particular website or editor, check the result, because only the common pieces are listed as handled.

For plain text, watch very long lines. They wrap, which keeps everything on the page, but a log with extremely long lines can become hard to follow once wrapped. Trimming them in the source first gives a cleaner page.

If you want a page break in plain text at a particular point, a form feed will do it, as long as your editor can insert one.

What to do next

Once the PDF exists, the rest of the app is available. Combine several converted notes into one pack with File > Combine files and you get a bookmark for each original. Add comments, highlights or stamps for review. Set page labels if the document has front matter.

If you have many text or Markdown files to convert at once, the Convert many files to PDFs option makes one PDF each into a folder you choose, which saves doing them one by one.

What this route does not do

Do not expect plain text to pick up formatting. Asterisks and hashes in a .txt file stay as characters, because only Markdown files are read as Markdown. If you want headings and bold, save the file with a Markdown extension and use Markdown symbols.

Do not expect a fancy page design either. This route is about clean, readable pages from simple sources, which is exactly what most notes and logs need. For anything more designed, write it in a proper layout program and export a PDF from there.

For everyday text and notes, PDF by Zaweba makes the jump from plain file to shareable document quick and entirely offline.