[PLUG] making text pretty?

Petcher, Danielx J danielx.j.petcher at intel.com
Wed Mar 12 15:55:03 UTC 2003


If you know just what printer you're using, you can embed escape codes in
the output to direct it to print as you've asked. Unfortunately, this locks
you into using that brand and model of printer for evermore. Likewise,
there's the problem of having to manually calculate line breaks, since Arial
is a proportionally spaced font.

A little more complex would be to learn PostScript. That, however is a whole
lot of work for such a simple change.

The simplest text formatting engine I know of would be something in the
family of runoff, roff or nroff, where you would embed formatting dotcodes
into your output text and then pipe your format tagged file through the
above-mentioned engine. There are other routines to format dotcoded text
into PostScript.

> man nroff

or 

> apropos nroff

might give you a few valuable clues.

-djp
 
Daniel Petcher
Software QA Tester (contract)
503-264-9011
 
http://folding.stanford.edu - the brain you save may be your own!

> -----Original Message-----
> From: Matt Alexander [mailto:m at pdxlug.org]
> Sent: Wednesday, March 12, 2003 3:44 PM
> To: plug at lists.pdxlinux.org
> Subject: [PLUG] making text pretty?
> 
> I wrote a shell script that reads a text file of names, addresses, etc.,
> and then creates letters that are sent to a printer.  Everything works
> perfectly...  except my manager doesn't like the plain text and wants to
> use an Arial font and underline certain portions of text.
> 
> Is there some way I can pass the output of my script to something that
> will make it an Arial font and do other formatting changes, and then
> print it?  Is there someway within the plain text to specify what should
> be underlined to the receiving program?
> Thanks,
> ~M
> 
> 
> 
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug




More information about the PLUG mailing list