Skip to content

How to convert a plain text file to a PDF

Turn a .txt or .log file into a clean PDF in DocFila. Lines, tabs and indents stay as written, many scripts are drawn, and it runs on your device.

Convert in DocFila

The short answer

Open the Text → PDF card in DocFila's Convert hub, choose your .txt or .log file, and save. Each line stays as written, in a readable layout. It runs on your device, reads UTF-8, UTF-16 and older Latin-1 files, and accepts files up to 5 MB.

Where does it run?

On this device, offline, for files up to 5 MB. DocFila draws the PDF with its own document renderer and bundled fonts.

What is kept, and what changes?

Kept

Changed or lost

What are the steps?

  1. Open Text → PDF. In Tools choose Convert and open Text → PDF. Searching “txt to pdf” or “notes to pdf” finds it.
  2. Choose the file. Select Choose files to convert and pick a .txt, .text or .log file. A file with the extension .md or .markdown uses the Markdown route instead.
  3. Convert. Start the conversion. DocFila reads the text, builds the pages and shows progress.
  4. Read the notes. If any characters could not be drawn, a note lists them. Otherwise there is nothing to review.
  5. Save the PDF. Choose Save converted file… and pick a location. The PDF has the same name as the text file.

Which options does it offer?

No options. The page layout is fixed, so the same file always gives the same PDF. If you want to control fonts, headings or margins, convert the text to Word instead, edit it there, and export to PDF from the document.

What are the limits?

One file at a time and up to 5 MB. A file that is really binary, such as a renamed image or document, is refused instead of printed as noise. The encoding is detected: a byte-order mark is honoured, UTF-8 is tried, and a file that is not valid UTF-8 is read as Latin-1.

When is another route better?

If your file uses Markdown headings and lists, use the Markdown to PDF page instead, which interprets them. To edit before you print, use Text to Word. For text that sits inside a PDF already, PDF to Text goes the other direction.

Questions

Is there a size limit for text to PDF?

Yes. DocFila accepts text files up to 5 MB for this conversion. Larger files are refused before conversion, so split the text or trim it first.

Will my line breaks and indents be kept?

Yes. Each line becomes a paragraph, and tabs and leading spaces are kept, with no extra spacing, so the page looks like the text file did.

What about accented letters and other alphabets?

DocFila reads UTF-8, UTF-16 with a mark, and older Latin-1 files, and draws many scripts. Anything its fonts cannot draw is named in a note rather than shown as empty boxes.

Is the PDF searchable?

Yes. The PDF contains real text, unlike a picture of text, so you can select the words, search for them inside the file and copy them into another document.

Convert it in DocFila

Free to start, no card needed.