💾 Archived View for mirrors.apple2.org.za › archive › apple.cabi.net › Utilities › Cap.Driver.doc.tx… captured on 2024-02-05 at 11:43:02.

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Capture  - a Print Manager port driver for debugging printer drivers
Copyright 1993, by David Empson

Version 1.1 - 12 April 1993

This program is FreeWare.  It may be distributed free of charge, in its
original form.  Please include the documentation, and don't lose the
resource fork!

Capture is a IIgs Print Manager 'Port' driver that I wrote to track
down a bug in a printer driver.  It's operation is quite simple: all
data output by the printer driver is written to a file on disk, instead
of going out a port on the back of the computer.

The file can then be examined using any desired program, to see exactly
what commands the printer driver is sending.


To install Capture, simply copy it into the System:Drivers folder on
your system disk.  To use it, you must use the Direct Connect Printer
Control Panel to select Capture as the output port, together with the
appropriate printer driver.

Capture requires System 5.0 or later.


By default, Capture will output its files to the RAM disk, which must be
called RAM5.  If you would like to output the files to another drive or
directory, use a resource editor to change the pathname in resource
type $8006 (rPString), ID=$00000001 to the desired drive and directory.
 You may use slash or colon separators as desired.

The filename of the output file is always of the form "CAPTURE.nnnn"
where nnnn is a number from 0001 to 9999.  Whenever the printer driver
calls PrDevOpen, Capture scans the output directory for the highest
numbered capture file, and creates a new file numbered one higher.

For example, if RAM5 already contains the following files:

  CAPTURE.0004
  CAPTURE.0009

then Capture will create the file CAPTURE.0010

Files that don't match this pattern are ignored.

If Capture detects any errors (specified directory doesn't exist, disk
full, CAPTURE.9999 already used), there will be no indication to the
user, and the printer data will go nowhere.

If the printer driver attempts to read data from the printer, the
Capture driver will return no data.  For example, the ImageWriter
driver sends an ESC ? sequence, to which the printer may respond with
an identification string, indicating the platen size, colour or black
ribbon, whether a sheet feeder is installed, etc.  With Capture, the
ImageWriter driver will assume that a dumb ImageWriter clone printer is
being used, as no data was returned.

Note that a large print run may require a lot of disk space.  For
example, a DeskJet at 300 dpi could require about a megabyte for a full
page of text.

Also note that some printer drivers (in particular the ImageWriter
driver) make multiple calls to PrDevOpen for each print job, so you may
end up with several files.  In the case of the ImageWriter driver,
three files are created, but the first two only contain an ESC ?
sequence (request ID string).


Revision History

Version 1.1: 12 April 1993

Added resource fork containing pathname, and directory scan for existing
capture files. ----- If you wish to contact me with any questions,
comments, suggestions for later versions, etc., my address is:

David Empson
P.O. Box 27-103
Wellington
NEW ZEALAND

Internet: dempson@swell.actrix.gen.nz