Hi Henrique, Bret,

> interesting to know that there's someone out there, familiar to FreeDOS, 
> still using those 9-pin printers. At least here in Brazil they're still 
> used on lots of places because of their low operational cost.
> 
> Well, Eric and Konstantyn... So much for the museum idea!

Well... We had a 24 pin printer 20 years ago and I patched some closed
source tools which were hardcoded for a 9 pin printer from 25-30 years
ago to work with that new printer when the old 9 pin broke, so... ;-)

Anyway, regarding your question and the comment from Bret: I think you
can do quite a bit with ESC/P, HP PCL and PostScript when you stick to
basic feature sets, as those tend to be in the "common denominator" of
things supported by different variants of said printer languages. You
can check the FreeDOS GRAPHICS source codes for the general idea if
you like, Bret :-)

The short story for printing text as graphics is as follows: You send
some ESC sequence to initiate graphics mode, then you send a header
sequence saying that N columns of pixel data follow and then you send
the pixel data as either 1 or 3 bytes per column (8 or 24 pins used).

For 24 pins, you can either scale a VGA font, increase margins, or both,
or design a special printer font. I think scaling 8x8 would be a bit
pointless (can just use low quality 8 pin mode then, even 24 pin head
printers support that) so I would either go for 8x16 and leave 8 pins
unused (line spacing and thus papere movement per line of graphics are
adjustable after all) or try to tweak-scale 8x14 to "ca 2 times 8x12".

For PostScript and HP PCL, the pixel data formats are different, but
you can be very creative with PostScript anyway. Actually uploading
a font might be a good choice for the latter, or turning the font to
some sort of "rendering macro" that you would send as "header" before
the text that you want to be printed.

As far as I remember, HP PCL pixel data was row oriented, so you send
all pixels for one stripe of paper (e.g. as wide as suitable to print
80 characters if that is the output style you have in mind) at a time
and the printer itself decides how to pool pixels to avoid having to
move the print head too much. Usually it would flush the pool when a
page gets full or no new data arrives for a certain amount of time.

Regards, Eric


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to