Text to PDF Converter
Plain text, logs and code to a clean PDF — with headers, page and line numbers.
Text
No text yet.
Your PDF is ready
Print preview
In the print dialog that opens:
- Set Destination (or Printer) to Save as PDF — on Windows you can also pick Microsoft Print to PDF.
- Keep Margins on Default and Scale at 100%: the page size and margins you chose here are already applied.
- Turn on Background graphics if colours or shading are missing, and turn off the browser’s own Headers and footers if you don’t want its date and address lines.
- On iPhone or iPad, use the share button in the print screen and choose Save to Files.
About the Text to PDF Converter
Paste text or open a .txt, .log, .csv or source-code file and get a tidy PDF: your choice of page size, margins, font size and line spacing, a header with the title and Page n of N, and optional line numbers for code reviews and printouts. Long lines wrap at spaces, break anywhere (for logs and long URLs) or shrink to fit, tabs line up on real tab stops, and form-feed characters start a new page.
The PDF is written in your browser with embedded fonts — Noto Sans for prose, Inconsolata for code — so it looks the same everywhere and its text can be selected and searched. Text in scripts that need shaping, such as Hindi, Tamil, Bengali, Arabic or Thai, and Chinese, Japanese or Korean, is laid out by your browser’s print engine instead, so every letter joins correctly. Nothing is uploaded.
How to use it
- Paste or type your text in the box, or press Open a file (or drop a file onto the box). The encoding is detected — UTF-8, UTF-16 or the Windows code page older programs use.
- Set the Title (shown in the header and used as the file name), pick Sans or Monospace, and choose the font size, line spacing, page size, orientation and margins.
- Choose how Long lines are handled, and tick Line numbers for code. Opening a code or log file switches to monospace automatically.
- Press Create PDF, then Download PDF. If the text contains a script that needs the print engine, press Show print preview and then Save as PDF, and choose Save as PDF in the print dialog.
Examples
app.py — 420 lines, tabs, a few lines longer than the page
An A4 PDF in Inconsolata with line numbers 1–420, tabs on 4-space stops, long lines wrapped without a number on the continuation line, and “app.py · Page 3 of 9” in the header
server.log — 50,000 lines with terminal colour codes
A landscape PDF with “Break anywhere” wrapping; the colour codes (ESC[31m …) are removed and the result says how many were left out
नमस्ते — कल की बैठक के नोट्स
The page switches to the browser print engine, so the conjuncts and vowel signs are shaped correctly in the PDF
Common uses
- Printing or archiving source code, configuration files and SQL scripts with line numbers.
- Sending a log, a stack trace or a CSV export to someone who only opens PDFs.
- Turning notes, poems, transcripts or a plain-text manuscript into a readable document.
- Making a PDF from text written in Notepad, TextEdit or a phone’s notes app.
Fonts and characters
The built-in writer embeds only the characters you use, from free fonts under the SIL Open Font License: Noto Sans (Latin with accents and ₹, Greek, Cyrillic and Vietnamese) and Inconsolata for monospaced text. Arrows, check marks and maths symbols come from the PDF standard fonts Symbol and ZapfDingbats, and box-drawing characters (├── └──) from Liberation Sans. In monospaced text every character takes exactly one column, so tables and trees stay aligned.
Characters none of these fonts have are shown as “?” and listed after the PDF is made, with the suggestion to use Browser print, which can use any font installed on your device.
Built-in writer or browser print
- Built-in PDF writer (default): the PDF is created on this page and downloaded straight away, with the header, page numbers and line numbers exactly where you set them.
- Browser print: your browser lays out the text with your device’s fonts and you save it with Save as PDF. It is used automatically for scripts that need text shaping — Devanagari, Bengali, Gurmukhi, Gujarati, Odia, Tamil, Telugu, Kannada, Malayalam, Arabic, Hebrew, Thai and others — and for Chinese, Japanese, Korean and emoji. The header with the title and Page n of N is printed by Chrome and Edge (version 131 or later); in other browsers turn on the print dialog’s own headers and footers.
Long lines, tabs and page breaks
Wrap at spaces breaks a line at the last space, hyphen or slash that fits, and inside a word only when the word is longer than a line. Break anywhere fills every line to the margin — best for logs, Base64 and long URLs. Shrink text to fit the longest line lowers the font size (down to 5 pt) so that no line has to wrap — handy for wide CSV or fixed-width reports.
Tabs move to the next tab stop (every 2, 4 or 8 characters), as in a code editor. A form-feed character (U+000C), which many programs put between printed pages, starts a new PDF page.
Limitations
- This is a plain-text converter: formatting such as bold, colours or syntax highlighting is not added. For formatted documents use Word to PDF.
- The browser print path depends on your browser’s print dialog; its page numbers in the header need Chrome or Edge 131 or later.
- Files up to about 30 MB of text and PDFs up to 5,000 pages can be made; the print preview takes up to 2 million characters. Very large files are converted in full but can’t be edited on the page.
- Binary files (images, Word or Excel files renamed to .txt) are rejected — open the original program and export plain text, or use the matching converter.
- The first PDF downloads the PDF engine and fonts once (about 0.6 MB), so it needs an internet connection.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
Is my text uploaded to make the PDF?
No. The PDF is written inside your browser (in a background worker on this page), and the file is saved straight from your device. Your text is never sent to a server.
Does it work with Hindi, Tamil, Bengali or Urdu text?
Yes. Those scripts need text shaping, so the page switches to your browser’s print engine, which shapes them correctly with your device’s fonts. Choose Save as PDF in the print dialog. The text in the PDF stays real text that you can select and search.
Can I keep the indentation of my code?
Yes. Spaces are kept exactly, tabs are expanded to the next tab stop (2, 4 or 8 columns), and the Monospace font keeps every column aligned. Turn on Line numbers to number the source lines; wrapped continuation lines get no number.
Why do some characters show as “?”
The built-in writer only has the embedded fonts, which cover Latin, Greek, Cyrillic, Vietnamese and common symbols. Characters outside them are replaced and listed after the PDF is made. Switch Make the PDF with to Browser print to use your device’s fonts instead.
What do the long-line options do?
Wrap at spaces keeps words whole, Break anywhere fills each line completely (good for logs and long links) and Shrink text to fit the longest line makes the font smaller instead of wrapping, down to 5 pt.