On Sat, Feb 02, 2002 at 12:32:57AM +0800, Gerald Timothy Quimpo wrote:
> what libraries, techniques, tips and tricks do you use when you need to
> have your program (linux or windows) produce formatted output (text, lines, images,
> tabular data, graphs) direct to the printer?

In Linux, generally, what I (used) to do was generate PostScript.  The
most general printer driver available on Linux and on most Unixes as
well is the PostScript driver, which in Linux takes the form of
Ghostscript.  Take a look at the print option in Netscape or Adobe
Acrobat for instance; they usually print by converting to PS first.
It's also the easiest way to embed images in a LaTeX document.  I once
needed some 3D line drawings in an article I was writing; the best
quality way I found to do this was to write a simple 3D renderer in Perl
that outputted PS.  LPRng and its older bretheren all work this way.

If you want to output straight to the /dev/lp device, you're going to
need to know what escape sequences the printer recognizes.  Chances are,
this information is hard to come by, and you'll wind up reinventing the
wheel mega.

-- 
Rafael R. Sevilla <[EMAIL PROTECTED]>   +63(2)   8177746 ext. 8311
Programmer, Inter.Net Philippines                +63(917) 4458925
http://dido.ph.inter.net/                        OpenPGP Key ID: 0x5CDA17D8
            Heute die Welt und Morgen das Sonnensystem!
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to