TXT to PDF Converter
Operator: Abdulla Al Fahad. How tools are built and checked
Log files, transcripts, licence texts, exported notes and the README that ships with a download all arrive as .txt, and sooner or later one of them has to go to somebody as a PDF. The TXT to PDF Converter sets a text file on US Letter or A4 pages in 11pt Helvetica with one-inch margins and a page footer. Drop the file, or paste text and choose Convert text; Try a sample supplies a few lines of meeting notes with a bulleted list.
With no formatting to carry over, everything hinges on one choice: what a line break means. Text hard-wrapped at 72 characters by an email client needs its lines joined back into paragraphs; a poem or an address needs every line kept; a log needs each line to stand alone. The Paragraphs menu offers those three readings, reruns the conversion as soon as you change it, and the preview and page count show the effect at once.
Key features
- Three paragraph modes that can be switched after conversion, so the right reading of the line breaks is a click away.
- Turns -, *, • and numbered lines into hanging-indent lists, nested by two spaces or a tab per level.
- Same page design as the Word to PDF converter: Letter or A4, Page N of M footer, selectable text.
- Splits over-long tokens at the margin so log lines and URLs are never cut off.
- Accepts .txt, .text and .log files up to 25MB, or pasted text.
How plain text is paginated
The three Paragraphs modes, the list detection for lines that start with a dash, bullet or number, and the decoding of UTF-8, UTF-16 and Windows-1252 files are the same as in the TXT to Word converter, and that page describes them in full. Here the mode decides the pagination: joined lines wrap to the PDF's own measure, kept line breaks become forced breaks inside a paragraph, and one paragraph per line gives every line its own 8pt of space below.
No headings are ever created, since nothing in a text file marks one, so the whole document is 11pt body text and lists; a title on the first line is simply the first paragraph. List items hang their marker a quarter inch to the left of the text, which starts half an inch inside the margin, each level of indentation in the source adding another quarter inch, and numbered items are renumbered from 1 for each run. A word longer than the line, such as a URL or a hash in a log, is broken into pieces that fit rather than dropped.
Layout follows the Word to PDF converter's rules, documented on that page: Letter or A4, one-inch margins, a centred Page N of M footer. The PDF's title is the file name, or Converted document for pasted text. A character the standard fonts lack becomes ? and is named in the warning; a file written mostly in a non-Latin script is refused instead and directed to the Word editor's print route.
How it works
The text is decoded and split into paragraph and list blocks exactly as the TXT to Word converter does it, with the selected Paragraphs mode deciding where paragraphs begin.
The blocks are then paginated by the engine behind the Word to PDF converter. In keep-breaks mode each original line break is a forced break within the paragraph; in the default mode the breaks are gone and only the PDF's own wrapping remains; in every-line mode each line is its own paragraph with spacing below. Changing an option runs the parse and layout again from the file you dropped.
Common use cases
- A legal team needs the plain-text licence that ships with a software package as a PDF exhibit with numbered pages.
- A podcast producer turns a transcript saved by a recording tool into a PDF for a guest to review.
- An operations engineer attaches the relevant section of a server log to an incident report, one line per paragraph so that nothing is joined.
- A songwriter sends lyrics to a band as a PDF with every line break kept exactly where it was typed.
- A student converts notes exported from a phone, one paragraph per line, into a printable document on the page size their university expects.
How to use this tool
- Upload a .txt, .text or .log file, or paste the text and press Convert text.
- Check the opening paragraphs of the preview against the source and change the Paragraphs option if lines were joined or split wrongly.
- Set Page size to the paper your reader prints on.
- Use Download .pdf to save the file, or Edit in Word editor when the text needs a title or emphasis first.
Example
Text file (hard-wrapped letter with a list)
Dear Ms Okafor,
Thank you for your order of 12 chairs. They will be
dispatched on Monday and should arrive within three
working days.
Please check the following on delivery:
1. The invoice number matches your purchase order
2. All boxes are sealed
- Report damage within 48 hours
Kind regards,
DanielPDF in the default mode (lines are joined)
Helvetica 11pt, US Letter, 1 page
Paragraph Dear Ms Okafor,
Paragraph Thank you for your order of 12 chairs. They will be
dispatched on Monday and should arrive within three
working days. (wrapped by the PDF, not the file)
Paragraph Please check the following on delivery:
1. The invoice number matches your purchase order
2. All boxes are sealed
• Report damage within 48 hours (2 spaces = one level deeper)
Paragraph Kind regards, Daniel (joined: choose keep line breaks)
Footer Page 1 of 1
Summary 49 words · 4 paragraphs · 3 list items · 1 PDF pageTips for best results
- Scan the first screen of the preview and change the Paragraphs option until sentences are neither glued together nor broken mid-line; the conversion reruns in a moment.
- Use keep line breaks for a letter: in the default mode the sign-off and the name under it are joined into one line, as the example below shows.
- For logs and data dumps, choose Every line is a paragraph. Lines wider than the page wrap, and tokens with no spaces, such as hashes and URLs, are split at the margin rather than lost.
- Dialogue written with leading dashes turns into bullets in every mode, so swap those dashes for quotation marks first if that matters.
- The PDF page chip in the summary is a good sanity check: continuous prose runs at roughly 600 words per Letter page, so a 20,000-word transcript should show about 35 pages.
Edge cases to watch
A file without any blank lines becomes a single enormous paragraph in the default mode; switch to Every line is a paragraph.
Columns aligned with spaces or tabs collapse to single spaces, so a text table becomes lines of values; convert real tabular data with a CSV tool instead.
Titles underlined with a row of = or - stay as two lines of text; nothing in a text file is promoted to a heading.
A form feed, which some programs use to mark a page break, becomes an ordinary line break. Nothing in a text file can force a new PDF page.
Common errors and how to fix them
- Paste some text first.
- Convert text was pressed with nothing in the paste box. Paste the text, or use Try a sample, and press it again.
- This file is not a text file. Choose a file that opens in a plain text editor.
- More than one percent of the first 4,096 characters were control codes, which means the file is binary: a .docx, .pdf or .rtf renamed to .txt, or a UTF-16 file saved without its byte-order mark. Save it as UTF-8 text from its own application, or convert it with the matching tool on this site.
- This document uses characters the built-in PDF fonts cannot draw (for example "Я"). Open it in the Word editor and use Print → Save as PDF instead.
- The file is written in a script the standard PDF fonts do not include. Open it with Edit in Word editor and print to PDF from the editor, which draws with your installed fonts.
Best practices
- Decide the paragraph mode from the file's origin: email and terminal output are hard-wrapped, so join; poetry, addresses and chat transcripts keep breaks; logs go one line per paragraph.
- Separate paragraphs with a blank line in the source rather than with indentation, which the converter removes.
- Use the Word editor hand-off for a title or emphasis: a text file cannot carry a heading, but the editor can add one before you print to PDF.
How plain text fills a page
A Letter page has a 6.5-inch measure and 648 points of height between the margins; A4 is a little narrower and a little taller. Each 11pt line takes 15.4 points, and every paragraph adds 8 points below itself, so the paragraph mode changes the page count more than the page size does. Continuous prose in the default mode fits about 42 lines, roughly 600 words, on a Letter page. In Every line is a paragraph mode each line carries the paragraph spacing as well, so the same page holds about 28 lines, and a 10,000-line log runs past 350 pages.
Long files are therefore worth cutting before converting. The 25MB limit is generous for text (a novel is under 1MB), but a 200,000-line log is within it and would produce a PDF of thousands of pages that is slow to build and useless to read; take the lines you need in a text editor first. Blank lines never add height on their own: one or ten empty lines between paragraphs give the same 8-point gap, so double-spaced source does not double the page count.
Frequently asked questions
Why did my whole file come out as one paragraph?
Because nothing told the converter where paragraphs end. In the default mode a new paragraph starts only after an empty line, so a file that never has one is a single paragraph. Use Every line is a paragraph, or insert blank lines where the breaks belong.
Can I pick a font or a font size?
No. The text is set in 11pt Helvetica and nothing else. For a different face, open the text in the Word editor, set the font there and use Print / PDF.
My file is in Polish and some letters show as question marks. Why?
The file decoded correctly, but the standard PDF fonts cover only Western European Latin letters, so ł, ř, ğ or ș have no glyph and become ?, with the warning listing them. Open the text in the Word editor and use Print / PDF, which draws with your system fonts.
Will the PDF keep my indentation?
No. Leading spaces and tabs are removed and internal runs of spaces collapse to one, except that indentation before a list marker sets the nesting level. Indented code or aligned columns will not look the same.