About this tool
Convert pasted text or TXT, Markdown, CSV and log files to PDF. The PDF contains real, selectable and searchable text, and Chinese, Japanese and Korean show correctly instead of empty boxes. Choose A4, Letter, A5 or A3 in either orientation, set margins, font size and line spacing, use a monospaced font with line numbers for code and logs, and add a header and “1 / 5” page numbers. Legacy encodings such as GBK are detected. Everything runs in your browser; nothing is uploaded.
Typical uses
- Send meeting notes or contract text from a plain-text file as a PDF
- Print or archive program logs and source code with line numbers
- Combine several TXT chapters into one PDF, each starting on a new page
How to use
Paste text, or open or drop one or more .txt, .md, .csv or .log files. Files are read as UTF-8; if that fails, GBK, Big5, Shift_JIS and other encodings are detected and shown, and you can choose one if the text looks garbled.
Choose paper, orientation, font size, margin, line spacing and font, and add line numbers, a header and page numbers if needed. Check the page count and line breaks in the preview, click Create PDF and download it.
Text is written as real, selectable and searchable text. Chinese, Japanese, Korean and other characters use the open-source Noto Sans CJK and Liberation Sans fonts, downloaded only when needed (about 2.1 MB for common Chinese and Japanese, 0.8 MB for Korean), with only the glyphs used embedded. Up to 20 MB (a warning above 5 MB) and 5,000 pages; characters without a font, such as emoji, appear as “?”. Markdown is not rendered; the text is set as written. Everything runs locally in your browser; nothing is uploaded.
Paper sizes and how much text fits on a page
PDF measures in points: 1 pt = 1/72 inch = 0.3528 mm. ISO 216 defines the A series, so A4 is 210 × 297 mm, or 595.276 × 841.89 pt; US Letter is 8.5 × 11 inches. The table uses the tool's defaults (11 pt type, 1.4 × line spacing, 20 mm margins, portrait) and is computed by the tool's own layout code.
| Paper | mm | pt | Lines per page | Monospaced characters per line | CJK characters per line |
|---|---|---|---|---|---|
| A4 | 210 × 297 mm | 595.276 × 841.89 pt | 47 | 73 | 43 |
| Letter | 215.9 × 279.4 mm | 612 × 792 pt | 44 | 75 | 45 |
| A5 | 148 × 210 mm | 419.528 × 595.276 pt | 31 | 46 | 27 |
| A3 | 297 × 420 mm | 841.89 × 1,190.551 pt | 70 | 110 | 66 |
A default A4 page therefore holds 47 lines. In the proportional font, ordinary English prose fits more letters per line than the monospaced column count, because most letters are narrower than 0.6 em. The number of lines is the usable height minus one font size, divided by the line spacing, plus one, so tightening the line spacing gains more lines than shrinking the margins.
| Use | Settings | Lines per page | Monospaced characters | CJK characters |
|---|---|---|---|---|
| Default (prose) | A4 portrait · 11 pt · line spacing 1.4 · margins 20 mm | 47 | 73 | 43 |
| Compact prose | A4 portrait · 10 pt · line spacing 1.4 · margins 20 mm | 52 | 80 | 48 |
| Large print | A4 portrait · 12 pt · line spacing 1.5 · margins 20 mm | 40 | 66 | 40 |
| Code (portrait) | A4 portrait · 9 pt · line spacing 1.3 · margins 15 mm | 64 | 94 | 56 |
| Code (landscape) | A4 landscape · 9 pt · line spacing 1.3 · margins 15 mm | 43 | 140 | 84 |
| Logs (landscape, small) | A4 landscape · 8 pt · line spacing 1.25 · margins 10 mm | 54 | 163 | 98 |
Whenever you change the paper, size, margins or spacing, the tool shows the lines per page and characters per line for the current settings, and the preview breaks lines exactly where the PDF will.
Why Chinese, Japanese and Korean do not turn into boxes
Many converters produce rows of empty boxes for Asian text, because PDF readers only guarantee 14 standard fonts (Helvetica, Times, Courier and a few others), none of which has Chinese, Japanese or Korean glyphs. This tool writes real text that you can select, copy and search. Latin text uses the built-in Helvetica (prose) and Courier (monospaced), with nothing to download. Other characters trigger a one-time download of an open-source font, and only the glyphs actually used are embedded — a font with tens of thousands of glyphs adds only the few hundred or thousand your text uses.
| Characters | Font | Download |
|---|---|---|
| English and Western European letters (é, ü, ñ, €…) | Helvetica / Courier (built into PDF) | 0 |
| Other Latin, Greek and Cyrillic (Polish, Czech, Russian…) | Liberation Sans | 0.14 MB |
| Symbols, arrows, box drawing (├──, ✓, →) | Noto Sans CJK subset | 0.06 MB |
| Common Chinese characters (GB 2312, JIS X 0208, Big5 level 1), kana, full-width punctuation | Noto Sans CJK subset | 2.17 MB |
| Rare Chinese characters (Extension A and beyond) | Noto Sans CJK subset | 4.35 MB |
| Korean Hangul | Noto Sans CJK subset | 0.82 MB |
Emoji, and scripts that need right-to-left layout or glyph shaping (Arabic, Hebrew, Thai, Devanagari), are not supported: characters with no font are shown as “?”, and the tool lists them before you create the PDF. Noto Sans CJK and Liberation Sans are released under the SIL Open Font License 1.1, which allows embedding in documents. Japanese text uses the Simplified Chinese design of Noto Sans CJK, so a few kanji (such as 直 and 骨) look slightly different from Japanese fonts.
Text encodings and where garbled text comes from
A text file stores bytes, not the name of its encoding. When you open one, the tool first looks for a byte order mark, then decodes strictly as UTF-8. If any byte sequence is not valid UTF-8, it tries GB18030 (a superset of GBK and GB 2312), Shift_JIS, Big5, EUC-KR and Windows-1252, keeps the result that looks most like real text and shows the encoding under the file name. The default choice is “Auto-detect (UTF-8, then GBK, Shift_JIS and others)”; if the preview still looks garbled, pick the encoding yourself.
| Encoding | Typical source |
|---|---|
| UTF-8 | Modern editors, web pages, Linux and macOS, most program logs |
| GB18030 / GBK | Older Simplified Chinese Windows Notepad files, TXT and CSV exports from older systems |
| Big5 | Older Traditional Chinese files (Taiwan, Hong Kong) |
| Shift_JIS | Older Japanese Windows files |
| EUC-KR | Older Korean files |
| UTF-16 | Files saved as “Unicode” on Windows, some exported logs |
| Windows-1252 | Older Western European files; also used to read ISO-8859-1 |
Each text can be up to 20 MB. Above 5 MB the tool warns that layout and export take longer and that phones may run out of memory. You can open up to 50 files at once, and one PDF can have up to 5,000 pages.
Tips for printing code and logs
- Choose “Monospaced (code, logs)” so that columns line up. A4 portrait at 9 pt with 15 mm margins gives 94 characters per line; in landscape it gives 140 characters and 43 lines per page, enough for code written to 100–120 columns.
- Logs are usually wide: A4 landscape at 8 pt, 1.25 spacing and 10 mm margins gives 163 characters per line and 54 lines per page.
- With “Line numbers”, each source line is numbered once and wrapped continuation lines are not, so you can refer to the original file in a review.
- Tabs expand to spaces using “Tab width” (default 4); Chinese, Japanese and Korean characters count as two columns, as they do in a terminal.
- A form feed (\f, Ctrl+L) forces a new page. Terminal colour codes such as ESC[31m are removed instead of appearing as stray characters.
- Long URLs, hashes and Base64 strings with no space to break at are wrapped at the edge of the line, never cut off. Closing punctuation such as 。and )never starts a line, following East Asian line-breaking rules.
- Several files are joined in list order; tick “Start each file on a new page”, and with the header turned on each page shows its file's name (or the title, if you set one).
Sources
- ISO 216:2007 — Writing paper and certain classes of printed matter — Trimmed sizes — A and B series
- WHATWG Encoding Standard (decoders used by browsers for GBK/GB18030, Shift_JIS, Big5, EUC-KR, windows-1252)
- Unicode Standard Annex #14 — Unicode Line Breaking Algorithm
- Noto CJK fonts (Adobe, Google) — source repository
- SIL Open Font License 1.1
Frequently asked questions
Can I copy and search the text in the PDF?
Yes. The text is written as real text, not images. Chinese, Japanese and Korean use an embedded subset of the Noto Sans CJK font, so copying returns the original characters.
My TXT file shows garbled characters. What can I do?
Files are read as UTF-8 first; if that fails, GBK (GB18030), Big5, Shift_JIS, EUC-KR and Windows-1252 are tried and the detected encoding is shown. If the preview is still garbled, choose the encoding under File encoding.
Why does the first Chinese or Japanese conversion take a moment?
The font for common Chinese and Japanese characters is about 2.1 MB and is downloaded once, only when the text needs it; Latin-only text needs no download. Only the glyphs used are embedded, so the PDF stays small.
Suggest an improvement to this tool
Missing an option, something awkward to use, or a wrong result? Let us know.