Skip to content

How to convert a Markdown file to a formatted PDF

Convert .md files to a PDF in DocFila with real headings, bold, italics, lists and code, and without the # and ** marks. Runs on your device.

Convert in DocFila

The short answer

Choose your .md or .markdown file in DocFila's Text → PDF card and save. Headings, bold, italics, lists, quotes and code are turned into formatted text and the markup characters are not printed. It runs on your device, for files up to 5 MB.

Where does it run?

On this device, offline, up to 5 MB. A file ending in .md or .markdown is read as Markdown; the same card prints a .txt file verbatim.

What is kept, and what changes?

Kept

Changed or lost

What are the steps?

  1. Open Text → PDF. In Tools choose Convert and open the Text → PDF card. Searching “md to pdf” finds it.
  2. Choose the Markdown file. Select Choose files to convert and pick a file that ends in .md or .markdown. The extension is what tells DocFila to interpret the markup.
  3. Convert. Start the conversion. DocFila builds a Word-style document from your Markdown and exports it to PDF.
  4. Check the result. Open the PDF to look at headings, lists and any tables. If something is missing, a note names characters or objects that could not be included.
  5. Save the PDF. Choose Save converted file…. The PDF keeps the file's name.

Which options does it offer?

No options. For a different look, use the Text → Word card on the same file, adjust styles in Word or in DocFila's editor, and export that document to PDF. The PDF comes from the same renderer either way.

What are the limits?

Files up to 5 MB, one at a time. The Markdown understood is the everyday subset: headings, bold, italic, code, lists, quotes, links, simple table rows and horizontal rules. Extensions of Markdown, such as footnotes, maths or diagrams, appear as the text that was typed.

When is another route better?

If you only want the words, with the markup characters printed, rename the file to .txt and use the plain Text → PDF route. To keep editing, convert to Word with Text to Word, which turns the same headings into Word headings. The Workspace editor also opens Markdown files directly.

Questions

Will the # and ** characters appear in the PDF?

No. When the file ends in .md or .markdown, DocFila reads the markup, formats the text and does not print the symbols. A .txt file, by contrast, is printed exactly as written.

Does it make a table of contents?

It creates real heading styles, so the PDF has the structure of your titles, but it does not insert a page of contents. Add one in the Word route if you want it.

Are tables supported?

Only in a simple way. Each table row becomes a line with its cells separated by tabs, not a bordered grid, so wide tables are better made in a spreadsheet.

Can I convert several Markdown files at once?

This conversion handles one file at a time. Convert each Markdown file in turn, and then combine the finished PDFs into one document afterwards with the Merge PDF tool.

Convert it in DocFila

Free to start, no card needed.