You are not logged in.

#1 2009-08-30 15:25:31

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Nicely Printing Plain Text [SOLVED]

Hey, this is a question that has been bugging me for a while. When I print plain-text files the type is large, the margins are too thin, and the text is split up. Is there a way to pretty-print ascii files? I use CUPS with lp.

I do use LaTeX quite a bit, but I am still a beginner. I have a script that converts a text file to use the minimal document class but it isn't quite minimal enough for me. I suppose I could try a inserting the text into a verbatim block, but I wanted to ask how other people print text files.

Surely there is some sort of filter that makes a reasonable text size, page layout and such?

Any help is greatly appreciated.

Last edited by egan (2009-09-01 02:29:51)

Offline

#2 2009-08-30 15:27:18

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Nicely Printing Plain Text [SOLVED]

Check out enscript.

Offline

#3 2009-09-01 00:30:28

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Nicely Printing Plain Text [SOLVED]

Check out the options for lp, too:  -o cpi=14 -o lpi=8 etc etc. That will take care of basic text size and margins if that's all you need.

Scott

Last edited by firecat53 (2009-09-01 00:31:00)

Offline

#4 2009-09-01 01:44:18

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: Nicely Printing Plain Text [SOLVED]

I have heard good things about enscript though have never used it. I often print files from inside vim with a simple :hardcopy command.

Offline

#5 2009-09-01 01:50:16

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Nicely Printing Plain Text [SOLVED]

hey, i'll throw in a protip!

enscript -p - "/path/to/file.txt" | psselect -r | lp

to print a document in reverse page order.  it's my default print command out of mutt (set pipe_decode and it prints emails beautifully).

Offline

#6 2009-09-01 02:29:38

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: Nicely Printing Plain Text [SOLVED]

Thanks for all all the help guys. enscript does what I wanted, so thanks for that tip.

Offline

Board footer

Powered by FluxBB