GRAPHICS tool for FreeDOS - GPL by Eric Auer eric@coli.uni-sb.de 2003
Please go to www.gnu.org is the GPL license was not included.

Usage:

Run the program (compile with nasm -o graphics.com graphics.asm), it
will become a TSR. It will print the graphics screen contents when
you press the PRINT SCREEN BUTTON in a supported non-text mode in PS
(PostScript, common data format for LASER PRINTERS) suitable for both
A4 and Letter paper. No color yet.

Other formats planned: Mostly 180 dpi 24 pin Epson (and compatibles)
and HP PCL printers. This is an alpha version, please help finding
bugs. Do not be surprised if it crashes - however, it seems to work
for me in DOSEMU 1.1.3.7 (apart from some EGA / VGA palette capture
flaws sometimes). Supported modes: CGA 320x200x4, CGA 640x200x2,
EGA 320x200x16 / 640x350x16, VGA 640x480x16, MCGA 320x200x256.

Hercules and maybe others planned. PostScript version takes about 2k
of RAM, Epson and HP PCL versions will probably take more. Should run
even on an 8086. Command line interface to remove TSR from RAM and
select the target printer port planned. Pressing print screen again
while print screen is working works as "abort" and skips some image
processing if possible.

You may modify this for your own needs, but may not change the license.
You may not use this in closed source projects, that is. Please send
any improvements and bug reports to help making this version better,
rather than only improving / repairing your local copy. Feel free to
mail even for just telling that it works :-). As usual with GPLed
software, if it does not work, you cannot blame me at all. However, any
bugs are of course unintentionally and GRAPHICS -should- work fine.

Be warned that if you have no PostScript printer (in general, most
laser printers are PostScript printers, most other printers are not!),
thousands of lines of textual description of the image may come out
of your printer. Better turn the printer off and restart DOS in such
a case, anything else is a waste of paper.

I am using the following DOSEMU configuration:
    $_printer = "file file"
(you need TWO printers because a bug in DOSEMU 1.1 can cause it to
send print screen results for TEXT modes to LPT2 rather than LPT1).

I am also using the following /etc/printcap entry with LPRng:
    file|printtofile:\
        :lp=/tmp/printtofile.ps
        :sd=/usr/spool/lpd/file:\
        :la@:mx#0:sh:\
        :lf=/usr/spool/lpd/file/log:\
        :if=/var/lib/apsfilter/bin/DJ8xx-a4dj-raw:
    #       :of=/usr/spool/lpd/file/:
    # la@ clears accounting flag, sh is suppress banner
    # mx#0 sets maximum size to 0k, which means unlimited
You must create the /usr/spool/lpd/file/ owned by lp.lp and
the printtofile.ps writeable for lp etc. to make this work.
Just delete / overwrite the file before you print to the file.
DOSEMU usually waits a moment before actually sending data to
the printtofile "printer". The DJ8xx-a4dj-raw filter is just ANY
filter which is in RAW mode. Just use some which you have around.

Next supported printer will probably be Epson / IBM / NEC / ... generic
180 dpi b/w 24 pin pinwriter, with some kind of dithering to reach at
least some half-sane level of quality. HP PCL could be tricky. Color
for PS or HP PCL is currently not planned, but if you can explain me
how to generate the required (color) raster data quickly, please tell
me. If you want support for 9 pin pinwriters or other resolutions,
send some explanation and ideas how to achieve decent quality on such
printers.

Have fun!
Eric.

