Dec 242017
 
Printer spooler.
File XPRT.ZIP from The Programmer’s Corner in
Category Printer Utilities
Printer spooler.
File Name File Size Zip Size Zip Type
PRINTIN.C 1547 570 deflated
PRTSETUP.C 5548 1332 deflated
PRT_PKG.C 4806 1325 deflated
XPRT.DOC 13718 4763 deflated
XPRT8.C 19307 4836 deflated
XPRT8.EXE 25248 14846 deflated

Download File XPRT.ZIP Here

Contents of the XPRT.DOC file









XPRT Print Utility 8.1

Rip Toren
POB 674
Columbia, MD 21045
May 7 1987





XPRT is a file printing and SPOOLing utility. It has
evolved over time (about a year and a half) to be a tool for use
with the EPSON, IBM Proprinter, and HP Laserjet printers.

INTRODUCTION

Possibly the fist thing you noticed when you opened this ARC
file was that the source code was included. I believe that by
distributing the source, it may help others to develop their own
products that may one day be of use to me. It also allow you to
customize the process to your needs.

If you do feel the urge to modify this program, please
follow these simple guidelines:

1. Comment out pieces of code, rather than deleting them.
This will give you a bigger ARC file for your own
uploading, as well as allow the next person to see how
it was in the beginning.
2. Keep the history up to date. Identify your changes
with comments that relate to a version number.
3. Don't sell it for money, give it away. This program is
still mine for any commercial purposes.
4. Keep the documentation up to date. Document any
enhancements.

I do not believe in SHAREWARE on this scale. Any request
for a $5-$15 contribution is almost always ignored. And a
request for any more than that is not justified for the type of
program that this is. Rather than cripple the program, I
distribute the source to hopefully enrich the future products in
the market.

If you do steal this code and remove all my credits, you
steal my name as well as my work, what can I do?







==CAPABILITIES==

* Print file header with name of file, date time group
(DTG) of file, DTG of printing and page number.
* Print multiple files listed as consecutive arguments.
* Use an input file as a control file to identify a
number of files to be printed.
* Allow printer selection from environment variable.
* Allow the number of file lines per page to be selected
through an environment variable.
* Allow selection of binding offset through an environ-
ment variable.
* Print files with weird combinations of backspaces,
independent linefeeds or carriage returns for bold
typing.
* Respond to formfeeds when found.
* SPOOLING of output to a data file for printing with
Dos's background PRINT utility (automatically invoked).
* Detect (hopefully) whether DOS's PRINT is already
installed.
* Detect the state of the printer (power off, off-line,
on-line ...).
* Display printing progress as percentage of total file
size printed.


==SETUP==

All of the control parameters are setup in the environment
space. This is usually done in your AUTOEXEC and then you forget
about them. The environment variables that are used are:

XP_PRINTER=[EPSON|LASER|PROPRINTER]
XP_LINES=n
XP_OFFSET=n
XP_SPOOL=drive:\path\
XP_DPRINT=drive:\path\PRINT.EXE

After (or before) setting these, you may wish to install the
DOS background PRINT utility. This is done with a command:

>PRINT /D:dev

Where 'dev' is the device to which you want the output to go.
The valid entries are listed in the DOS manual. It is important
that you specify the /D: value with the command. XPRT looks at
the command line that invoked whatever program is attached to
interrupt 0x2F, and needs to find the '/D:dev' portion to decide
that the print program is resident.







This was a full blown setup. You may elect not to have
spooling, or to use the defaults for these items, in which case
you do not have to specify them. The defaults are:

XP_PRINTER = epson
XP_LINES = 75
XP_OFFSET = 0
XP_SPOOL = none
XP_DPRINT = none

If no environment variables are installed, XPRT will print
directly to the PRN device, with 75 file lines per page, aligned
on the left edge of the page, using EPSON control codes.

==EXECUTION==

To execute XPRT, simple give the command:

>XPRT fn1 fn2 ...fnn

This will print each file in order. If one of those file
names begins with '@', it will be interpreted as a COMMAND file.
A command file is one where each line of the file contains the
name of a file to print. Each entry may contain a drive, path
and must contain a file name. Do not leave ant imbedded spaces
in the entries.

Command files may not be imbedded. The imbedded file that
begins with the '@' will simply be printed as is.

In my environment, I use DS (Directory Scanner by Cmdr.
Martino) all the time. It will issue a simple "print" command
for tagged files. I have the DOS PRINT.EXE in a DOS sub-
directory, but not as part of the path. I have placed XPRT in my
\COMMANDS directory, and renamed it PRINT.EXE. It now does all
my printing.

==PRINTER SELECTION==

The selection of the printer is really straight forward.
The EPSON and PROPRINTER selections are very similar, with the
exception of getting the small print. XPRT prints using elite
type on the dot matrix, and used the compressed line printer on
the HP Laserjet+. The Proprinter I have tested this with is
actually an EPSON FX 286 emulating the Proprinter. Hope that
this is close enough.

In the LASER mode, I was able to test up to version 7.0.
Then I lost access to a laser printer. These items may need some
tweaking, especially the positioning of the bottom footer line.

==LINE SPACING & BINDING==






The line spacing is actually variable from 8 to some really
un-usable values. The header and footer portions of the page are
printed in 8 lines per inch. The actual file section is printed
in whatever spacing is needed to fill it with your specified
number of lines. What you specify in XP_LINES is really the
number of FILE lines that you want on a page. The middle 9.5
inches of the page are used for this. The inter-line spacing is
computed and the printer setup that way.

In order to keep the size of the spool file small, vertical
tabbing is used to move to the first file line, as well as to the
page number entry at the bottom. While it is possible to specify
a number as large as 200 lines per page, this would not really be
readable. I have done 85 line per page for some archival listing
that could be read.

The XP_OFFSET determine the amount of space to pad in front
of each file line. This is nice for punching holes, and not
having to read from the binding crack. As implemented, these are
real spaces, not tabs.

==OVERPRINTING==

There are a number of documentation files that exist that
produce overprinting through backspacing, or carriage returns
with no line feeds. XPRT has been tested on two of the toughest
I have seen (FCONSOLE.DOC & ZCOMMANxx.DOC). They both passed
with flying colors.

==RUN-TIME DISPLAY==

While XPRT is working, a status display will show you the
progress through the file. In the case of some of those strange
DOC files, seeing which page is being printed does not always
tell you much about how much longer this will take. The file
ZCOMMANAB.DOC average 4128 bytes per page, which is double a
normal single spaced page. As a result, the total number of
bytes in the file is displayed, along with a running percentage
display of the amount of the file that has been processed. In
spooling situations, a final page count will also be given.

==SPOOLING==

I must admit that the motivation for this feature was my
background in mainframes, and a device I had on a previous system
called the "Companion Card" from MEGA-OMEGA. That device allowed
the selection of a portion of its expanded memory to be used as a
true print spool, that trapped and buffered all data intended for
the printer, and then printed it in background. No need to place
it in a file first. It was great!

On my system, I have a ram disk that I hardly ever use. I
decided to use that space as a print spooling device. I was also
tired of waiting 35 minutes to print a formatted document.






In order for spooling to take place, you MUST specify BOTH
the XP_SPOOL and XP_DPRINT variables.

XP_SPOOL is the drive and path to the directory where you
wish to place the spool file. This entry must end
with the path separator character (usually '\').
XPRT will build and append a file name to this as
the file to open. The file name will be the
current DTG as 'MMDDHHMM.SPL' (month day hour
minute).
XP_DPRINT is the full command to start the DOS background
printer. On my system it is "C:\DOS31\PRINT". I
keep all of the DOS commands in a separate
directory, not as part of the PATH. Once all of
the files are processed into the spool file, this
string is issued as a command with the appropriate
file name.

The final step is to determine if the PRINT utility has
already been installed. When PRINT is invoked, it leaves its
resident portion of code in memory as a terminate and stay
resident (TSR) module. The reason that I attempt to check for
this TSR portion is that if the program is run for the first time
as a child from XPRT, there will be a gap in memory after XPRT
has terminated, but PRINT's TSR portion is still there (very
messy and possibly dangerous).

First XPRT determines if interrupts 0x28 and 0x2F have the
same segment pointer. If so, the command line portion of that
code is searched for '/D:dev'. If XPRT does not locate '/D:dev'
for whomever is handling interrupt 0x2F, it assumes that PRINT
has not been installed. A message is displayed to this effect
and XPRT terminates. The complete spool file will have been
created where you directed, but not printed. You may then invoke
PRINT on your own, positioning its TSR portion as you wish.

This attempt to locate PRINT may not always work. There may
be other combinations of programs that foul this up. If everyth-
ing is OK up to this point, your string from XP_DPRINT is given
as a command. Two return codes are displayed, separated by a
slash. The first is the code for attempting to invoke the
command. A -1 indicates that the command was not found. The
second is the return code from the command itself. If all goes
well, these should be 0/0.

If not, just comment out that piece of code, and be sure
that your AUTOEXEC installs PRINT (with the /D: parm).







==WHERE TO POINT THE FINGER==

I can be reached at the above address with comments,
complaints, or your favorite enhancements. You may also leave a
message for "RIP TOREN" on either of the two RBBSs listed below:

Computer Connection (202) 547 2008
DARWIN (301) 251 9206

+++ ENJOY +++


 December 24, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)