Mail Archives: djgpp/2000/05/13/13:43:00
On Sat, 13 May 2000 19:40:43 +0400, "Alexei A. Frounze"
<alex DOT fru AT mtu-net DOT ru> wrote:
>Tom wrote:
>>
>> can someone tell me where to find information on sending output to the
>> printer. I wan tot be able to do things like lines, circles, and other
>> graphical things. Also is there a way to change the font that a printer
>> uses? Thanks
>
>AFAIK a printer prints either images or text. It has nothing about circles
>and other shapes.
Dumb printers know only about bitmaps and text. PCL and PostScript
printers, on the other hand, can render simple shapes (PS can do
really complex things; it's a Turing-complete language).
If you really want to print something from a DJGPP program:
1. render it into pixels with Allegro or something similar
2. dither it down to one bit per channel, using Floyd-Steinberg
3. beg the printer vendor to send you information on how to write
a driver
4. implement the driver from the supplied spec
In my experience, the most difficult step is #3, unless the printer
supports a standard language such as Epson emulation, Hewlett-
Packard PCL, or Adobe PostScript. Many newer color inkjets (including
my HP 720C :-( ) are paperweights because they are designed
specifically to work with proprietary, trade-secret, binary-only
drivers available only for Microsoft(R) Windows(R) 95, Microsoft(R)
Windows(R) 98, Microsoft(R) Windows(R) NT, and Microsoft(R) Windows(R)
2000. (Microsoft and Windows are trademarks of Microsoft Corporation,
registered in the United States and other countries.)
Or:
1. render it into pixels with Allegro or something similar
2. dump it to a .bmp file (Allegro can do this)
3. write a program with MinGW (a DJGPP-like system that supports
Win32) or RSXHeadacheNTDJ (a DJGPP add-on that makes Win32 apps)
that dumps the .bmp file to the Windows printer API.
http://www.mingw.org/
--
Damian Yerrick
"I refuse to listen to those who refuse to listen to reason."
See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html
This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses. http://www.mcafee.com/
- Raw text -