Reputation: 770
I am am converting simple text file to PDF from command line on Mac using following code:
enscript -Bp '-' input.txt | pstopdf -i -o outfile.pdf
What I would like to do is that color my text/font in PDF file. I believe enscript has color options but I could not make it work. For example, how can I convert a text in input.txt into red fonts. Can anyone help? Thank you.
Upvotes: 1
Views: 2087
Reputation: 770
Here is a thread that has the answer.
In short first define escape character as follow: -e~ (tilda is escape character in this case).
Now, make sure that escape is in your input.txt file: ~color{1 0 0}This is a sentence in input file.
When you run the command input file text should be colored in red.
Upvotes: 1