how do I convert .txt to .pdf and keep the formatting

Copy link to clipboard
Copied
I have a large .txt file that I would like to convert to .pdf. I have tried to print the file and choose Adobe PDF but the output is just a mess. I loose all the formatting and get blank pages every so often. Does anyone know if is possible to convert .txt to .pdf and keep the formatting. I would try a virtual printer application but I am not able to just install any application on my office computer. Any help would be greatly appreciated.
Copy link to clipboard
Copied
What application are you opening the .txt file in to create the PDF? Most basic text editors (Notepad and Textedit for two) don't recognize page size or breaks so you won't be able to pre-format the file. You would need to bring it in to something like MS Word.

Copy link to clipboard
Copied
I am opening the txt in notepad. i tried opening in word but when I do that its even more of a mess then when I convert from txt to pdf.
Copy link to clipboard
Copied
Unfortunately, you will probably need to reformat it in Word to get a good PDF out of it.
Copy link to clipboard
Copied
It may be a bit late for you now but in future (and for anyone else interested) I would recommend copying the text into a word document and changing the text font to Consolas. Adjust the size to fit the page again and it should match the original notepad formatting.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
This worked!

Copy link to clipboard
Copied
It worked for me too. Yeah, this tip should to be as the right answer.
Copy link to clipboard
Copied
Somebody pin this as the asnwer. It worked perfectly!
Copy link to clipboard
Copied
No, you can't convert a .txt file keep the full formatting. However it is possible to convert with partial formatting, I have found this cool trick to convert a notepad txt file to pdf file. >> How to Convert Notepad txt to PDF file without software and online site for free . To keep all the formatting as it is you need to use word to pdf conversion >> How to Convert MS Word to PDF Files free without software & online converter sites
[Blog promotions removed. There is a way to do this with Adobe products]
Copy link to clipboard
Copied
Maybe you want to try with [software advertisement removed. Adobe sells a product that does this] converter, and share your feedback.
Copy link to clipboard
Copied
Simply use the Print (Ctrl + F) function in Notepad and then Microsoft Print to PDF. That way the formatting stays the same.

