Text to pdf Converter
Convert plain text into a PDF with control over page size, orientation, margins, font size and alignment.
Your Text
chars
words
PDF Options
Embedded in the PDF file metadata
.pdf
Name of the downloaded file
8pt22pt36pt
5mm25mm50mm
1Γ tight1.5Γ normal3Γ spacious
About This Tool
This text to PDF converter turns typed or pasted text into a downloadable PDF file with proper page layout. You choose A4 or US Letter page size, portrait or landscape orientation, the font size in points, the margin in millimetres applied to all four sides, a line spacing multiplier, and one of four text alignments: left, centre, right or justified. A document title can be embedded in the PDF's file metadata, and you set the name of the downloaded file separately. Long lines are wrapped to fit the usable width and pages break automatically when the text runs past the bottom margin, so a long document paginates without any manual intervention. The PDF is produced in your browser using the jsPDF library, so the text is not sent anywhere. It suits notes, transcripts, logs, letters and anything you need as a fixed-layout file.
Page geometry, line height and automatic pagination
The generator creates a document in millimetres at the page size and orientation you pick, then works out the usable area by subtracting the margin twice from both the page width and the page height.
Line height is derived from the font size, which you set in points, and the line spacing multiplier. A point is one seventy-second of an inch and an inch is 25.4 millimetres, so a point is 25.4 divided by 72 millimetres. The font size in points is converted that way and then multiplied by the spacing factor to give the distance from one baseline to the next.
Your text is then split into lines that fit the usable width, wrapped at the measured text width rather than a fixed character count, so wrapping respects the real font metrics. Each line advances the vertical position by the line height, and when that position would pass the bottom margin a new page starts.
Alignment changes where each line is anchored: at the left margin, at the horizontal centre of the usable width, at the right edge of it, or stretched across it for justified text.
Line height is derived from the font size, which you set in points, and the line spacing multiplier. A point is one seventy-second of an inch and an inch is 25.4 millimetres, so a point is 25.4 divided by 72 millimetres. The font size in points is converted that way and then multiplied by the spacing factor to give the distance from one baseline to the next.
Your text is then split into lines that fit the usable width, wrapped at the measured text width rather than a fixed character count, so wrapping respects the real font metrics. Each line advances the vertical position by the line height, and when that position would pass the bottom margin a new page starts.
Alignment changes where each line is anchored: at the left margin, at the horizontal centre of the usable width, at the right edge of it, or stretched across it for justified text.
Working out how many lines fit on an A4 page
Take the defaults most people start from: A4 portrait, a 20 millimetre margin, 12 point text and 1.5 line spacing. A4 measures 210 by 297 millimetres.
Usable width is 210 minus 20 twice, which is 170 millimetres. Usable height is 297 minus 20 twice, which is 257 millimetres.
Line height comes from the font size. Twelve points divided by 72 gives one sixth of an inch, and multiplying by 25.4 gives 4.233 millimetres. Applying the 1.5 spacing multiplier gives 6.35 millimetres per line.
Dividing the 257 millimetres of usable height by 6.35 gives 40.47, so 40 full lines fit on each page before the generator starts a new one.
Change one setting and the arithmetic moves. Reduce the margin to 10 millimetres and usable height rises to 277, which at the same line height fits 43 lines. Drop the spacing to 1.2 instead and the line height becomes 5.08 millimetres, so the original 257 millimetre area now holds 50 lines. Switching to landscape swaps the dimensions, giving a 257 millimetre usable width and a 170 millimetre usable height, which fits far fewer lines but much longer ones.
Usable width is 210 minus 20 twice, which is 170 millimetres. Usable height is 297 minus 20 twice, which is 257 millimetres.
Line height comes from the font size. Twelve points divided by 72 gives one sixth of an inch, and multiplying by 25.4 gives 4.233 millimetres. Applying the 1.5 spacing multiplier gives 6.35 millimetres per line.
Dividing the 257 millimetres of usable height by 6.35 gives 40.47, so 40 full lines fit on each page before the generator starts a new one.
Change one setting and the arithmetic moves. Reduce the margin to 10 millimetres and usable height rises to 277, which at the same line height fits 43 lines. Drop the spacing to 1.2 instead and the line height becomes 5.08 millimetres, so the original 257 millimetre area now holds 50 lines. Switching to landscape swaps the dimensions, giving a 257 millimetre usable width and a 170 millimetre usable height, which fits far fewer lines but much longer ones.
Getting a readable result and knowing the limits
For body text, 11 or 12 points with spacing between 1.3 and 1.5 reads comfortably. Margins below about 15 millimetres risk being clipped by desktop printers, which usually cannot print to the very edge of a sheet, so keep 15 to 20 millimetres if the file will be printed rather than read on screen.
Alignment is a judgement call. Left alignment gives even word spacing and is the safest default. Justified text produces tidy edges on both sides but, in a narrow column or with long words, can open distracting gaps between words, since there is no hyphenation to even them out. Centre and right alignment suit short blocks such as a title or an address rather than running text.
This converter handles plain text. It does not interpret Markdown, HTML tags or rich-text formatting, so bold, italics, headings, tables and images are out of scope, and any markup you paste will appear literally. Indentation and blank lines are preserved as typed, which makes it suitable for logs and transcripts. Remember the document title goes into the file's metadata, while the filename setting controls what the download is called.
Alignment is a judgement call. Left alignment gives even word spacing and is the safest default. Justified text produces tidy edges on both sides but, in a narrow column or with long words, can open distracting gaps between words, since there is no hyphenation to even them out. Centre and right alignment suit short blocks such as a title or an address rather than running text.
This converter handles plain text. It does not interpret Markdown, HTML tags or rich-text formatting, so bold, italics, headings, tables and images are out of scope, and any markup you paste will appear literally. Indentation and blank lines are preserved as typed, which makes it suitable for logs and transcripts. Remember the document title goes into the file's metadata, while the filename setting controls what the download is called.
Frequently Asked Questions
It depends on your settings. With A4 portrait, a 20 millimetre margin, 12 point text and 1.5 spacing, the line height is 6.35 millimetres and the usable height is 257 millimetres, which fits 40 lines per page. Reducing the margin or the line spacing increases that number.
No. It converts plain text, so any Markdown symbols or HTML tags you paste will appear literally in the PDF rather than being rendered as bold, headings or links. Line breaks, blank lines and indentation are preserved as typed, which makes it well suited to notes, logs and transcripts.
The document title is embedded in the PDF's file metadata, which is what a PDF reader displays in its window title and what some document management systems index. The filename setting controls only what the downloaded file is called on your computer. You can set them to different values.
Only for wide columns. Justification stretches each line to both margins by adjusting word spacing, and without hyphenation a narrow measure or long words produce visible gaps between words. Left alignment keeps word spacing even and is the more reliable default for most documents.
No. The file is generated in your browser using the jsPDF library, which builds the document locally and triggers a download directly. The text you type stays on your device. The tool loads the library from a public CDN, but the content of your document is never transmitted.
Current Settings
- Page
- Font size
- Alignment
- Margins
- Line spacing
Tips
- β Use A4 for international docs, Letter for US/Canada
- β Landscape is great for wide tables or code snippets
- β 12β14pt is ideal for comfortable body text
- β 20β25mm margins give a professional look
- β 1.5Γ line spacing improves readability significantly
- β The PDF is generated entirely in your browser β your text is never uploaded
Category
π File ToolsFrequently Asked Questions
It depends on your settings. With A4 portrait, a 20 millimetre margin, 12 point text and 1.5 spacing, the line height is 6.35 millimetres and the usable height is 257 millimetres, which fits 40 lines per page. Reducing the margin or the line spacing increases that number.
No. It converts plain text, so any Markdown symbols or HTML tags you paste will appear literally in the PDF rather than being rendered as bold, headings or links. Line breaks, blank lines and indentation are preserved as typed, which makes it well suited to notes, logs and transcripts.
The document title is embedded in the PDF's file metadata, which is what a PDF reader displays in its window title and what some document management systems index. The filename setting controls only what the downloaded file is called on your computer. You can set them to different values.
Only for wide columns. Justification stretches each line to both margins by adjusting word spacing, and without hyphenation a narrow measure or long words produce visible gaps between words. Left alignment keeps word spacing even and is the more reliable default for most documents.
No. The file is generated in your browser using the jsPDF library, which builds the document locally and triggers a download directly. The text you type stays on your device. The tool loads the library from a public CDN, but the content of your document is never transmitted.