About Text to PDF Converter
Paste or type text, or open a .txt file, and get a PDF whose words can be selected, searched and copied, not a picture of them. Long lines wrap at the margins, long documents flow onto as many pages as they need, and a form feed character starts a new page.
Keep line breaks exactly as typed, for poems, logs and code, or join them into paragraphs for text that was wrapped at a fixed width. The same page also writes Markdown and HTML as formatted documents. Everything happens in your browser.
How it works
- The text is broken into lines at spaces and after hyphens, measured with the real widths of the font, and placed on pages inside the margins you choose.
- Text is set in Liberation Sans, embedded in the PDF with only the characters used, so it covers Latin, Greek and Cyrillic. Monospace text uses the standard Courier font when every character allows it.
- For other scripts, add your own TTF or OTF font: characters the built-in font lacks are drawn with it. Characters no font has stop the conversion with a list of them, rather than vanishing.
- The PDF is written in a background worker with pdf-lib, then page 1 is drawn as a preview. The font is fetched once from this site and kept for offline use.
Questions
Can I select and search the text in the PDF?
Yes. The PDF holds real text in an embedded font, so it can be selected, copied, searched and read aloud by a screen reader.
Does it work for Chinese, Japanese or Korean text?
Yes, if you add a font that has those characters, such as a Noto Sans CJK TTF or OTF file. The built-in font covers Latin, Greek and Cyrillic only. Arabic, Hebrew and Indic scripts are refused, because they need text shaping this tool does not do.
Why did some monospace lines come out in the proportional font?
The standard Courier font only has Western European characters. A line with any other character (a paragraph, when line breaks are joined) is set in Liberation Sans instead, so nothing is lost.
How long can the text be?
Up to 2 MB of text, and up to 2,000 pages. Long documents show their progress and can be cancelled.
Is my text uploaded?
No. The text never leaves your browser. The only downloads are the font and the preview renderer, both from this site, the first time you make a PDF.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.