Link to home
Create AccountLog in
Avatar of dory550 lambert
dory550 lambertFlag for United States of America

asked on

Convert text file to PDF using command line in LINUX

Hi Guys
How can I Convert a text file to PDF using command line in LINUX?
(1-3 pages text files)
Thanks
Dory
ASKER CERTIFIED SOLUTION
Avatar of awhughes
awhughes

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
following two steps will give you a pdf out of text file

note: for textfmt you have to install hylafax

textfmt input.txt > temp.ps
ps2pdf temp.ps output.pdf

Open in new window

Avatar of dory550 lambert

ASKER

nasirbest:
Thanks for your input
I am running Red Hat Enterprise Linux ES release 4
I do not seem to find the command 'textfmt'
Dory
Avatar of madunix
madunix

I use the a2ps (ASCII to PostScript) filter  http://www.ps2pdf.com/index.htm

madunix:

You introduced to 2 programs  which are new to me and which I really thank you for.
Obviously you have experience using these programs.
It would really help if you could supply a little sample
like a script file (Bash?) that would use a text file called 'ordertxt' as input and ordetxt.pdf as an output
Thanks
Dory