home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
swCHIP 1991 January
/
swCHIP_95-1.bin
/
utility
/
spoolf20
/
read.me
< prev
next >
Wrap
Text File
|
1995-12-09
|
16KB
|
374 lines
SpoolFle copyright 1994 Paul F. Poellinger, Silent O Software
-------------------------------------------------------------------
In Windows, a user can print to a file using the FILE: port, or by
setting up a filename as a port, or by using my excellent WinPtr
program, mentioned far below. What gets created in that process is
a DOS file containing everything the printer needs to recreate the
printed output...including all control characters the printer driver
meant to send to the printer for control and formatting. THE FILE IS
NOT A TEXT VERSION OF THE PRINTED OUTPUT. Most of it is not humanly
readable.
The main reason for doing this is to transport the file to another
machine with that printer driver and cause the output the file contains
to be printed.
Therein lies the rub. DOS makes it possible to print such a file
by providing a "binary" switch on the DOS Copy command, e.g.
copy report.prn lpt1 /B ... where the /B says binary
and 'lpt1' is the printer port
BUT...windows provides no such function. It can be done by shelling
to DOS, tho one takes a chance of confusing Print Manager, and it's
a kludgy process.
Another common approach works better, but not as well as this program:
The Windows Device Driver Development Kit, and thus the Windows API
provides a SpoolFile() function. But its use is problematic. Print
Manager must be activated. Its use with non-local (read network)
printers can result in "undefined behavior" (read GPFs). Print Manager
treats SpoolFile()-sent files as "temp" files and deletes them after
printing them. Finally, a bug in SpoolFile() causes Print Manager
to GPF when the application that called SpoolFile() terminates before
Print Manager is done spooling the file to the port.
This program uses a different, better approach:
using the PASSTHROUGH printer escape functions of the Windows API.
These allow this program to send the file contents to the printer
through normal Windows channels without the driver supplying any
additional control information. It has none of the above problems.
PASSTHROUGH is special support provided by printer drivers for this
exact purpose. Alas, some printer drivers do not support passthrough.
To avoid that possibility, this program uses its own printer driver,
a special driver created for the single purpose of providing
passthrough facilities. This is done so you you can rest assured
that your file will get printed no matter what printer you're using.
It makes no changes to your Windows or printer configuration in
accomplishing its mission. AND, unlike some less reliable similar
utilities, it does not require that you be using the Windows Print
Manager...and it works with network printers.
Finally, you must understand that when the printer output file is
created, it is created for the type of printer that is active at
that time. When the file is printed, the same type of printer must
print the output...because the file contains codes specific to that
type of printer, probably not understood by another type. For example,
files printed from the HP LaserJet III driver would not later print
on the Epson LX-810 dot matrix printer.
-------------------------------------------------------------------
UPDATE History:
09-Nov-94 2.0 Added copies dialog,
user-defined file filter,
ability to restore copies dialog in ini file,
ability to kill/restore completion dialog in ini.
18-Sep-94 1.0 Initial release
-------------------------------------------------------------------
Included:
SpoolFle files
--------------
SPOOLFLE.EXE The real deal
READ.ME self-reference (this)
PELIWARE.INI control file
PELI_RAW.DRV Alternate driver
Install files
-------------
INSTALL.EXE
INSTALL.BIN
INSTALL.INF
INSTALL.BMP
Uninstall file
---------------
X_SPOOL.EXE
All SpoolFle files must be placed in the same directory, one of your
choice, tho the install procedure will suggest c:\windows\spoolfle.
I insist that the ini and drv files be kept with the exe for ecological
purposes...it makes removal so much cleaner.
However, since the uninstall program cannot remove itself from the
..\spoolfle directory if it's started from there, don't put it there.
I suggest you put all files on a diskette, if you didn't get it that way,
then install and uninstall from there.
INSTALLATION:
------------
* Crank up Windows.
* Select FILE/RUN from the Program Manager menus.
* Type a:install.
- SpoolFle can initially be installed into its own Program Manager
group. The install procedure will do this for you. In the event
you want it in some other group, an override is provided. Note,
tho, that the x_spool, the uninstall, will only remove the default
group.
REMOVING SPOOLFLE FROM YOUR SYSTEM:
--------------------------------
* Crank up Windows.
* Select FILE/RUN from the Program Manager menus.
* Type a:x_spool.
OR
* click on the "Remove SpoolFle" icon in the "SpoolFle" program
manager group, if you left it as installed.
- All evidence of SpoolFle's existence will be removed. Your loss.
- Everything in the "SpoolFle" group AND the group will be removed.
- The icon(s) I installed may remain if they're no longer in a
"SpoolFle" group. You'll have to remove them yourself then...but
x_spool will have removed the programs they point to.
------------------------------------------------------------------------
HOW TO USE SpoolFle:
* you can launch SpoolFle, by double-clicking it's icon. It'll
display a Windows file-selection dialog for you to select the
file to be printed. Select one, and you'll be asked how many
copies, then it/they'll print...with a "completed" message when
spooled.
* you can use Program Manager's FILE/RUN menu to launch SpoolFle,
with, or without a filename specified:
SpoolFle
or
SpoolFle c:\report.prn
If no file is specified, the file-selection dialog will popup.
NOTE: OUTPUT IS AUTOMATICALLY SPOOLED TO THE CURRENT WINDOWS
DEFAULT PRINTER, so be sure your target is the default
prior to launching Spoolfle.
* The copies dialog box has a check box which allows you to keep
from being asked how many. If you check it, you'll only get
one copy from then on...until you comment the
CopiesDialog=0
entry in the Peliware.ini file. INI file entries are commented
by putting a semi-colon as the first character on the line:
;CopiesDialog=0
* Similarly, you can keep SpoolFle from popping the "completed"
message by uncommenting the
;CompletionMessage=0
entry in the Peliware.ini file. Uncomment it by removing the
semi-colon to restore the message.
* The Peliware.ini file also contains an entry which allows you
to specify a filename template for the file selection, instead
of *.prn, the default. The ini file entry is:
;DefaultFilter=*.xyz
Uncomment the entry (by removing the semi-colon), and change
the *.xyz part to whatever template you desire, e.g.
DefaultFilter=*.txt
or DefaultFilter=PFP*.DRW
or DefaultFilter=abc*.*
Upper/lower caseness is unimportant. Re-comment the entry to
restore *.prn as the default (that's what Microsoft recommends
for files created by printing to files.)
NOTEPAD can be used to edit the Peliware.ini file. INI files
as not sensitive to upper/lower caseness.
AN ALTERNATIVE launching mechanism:
You can set up SpoolFle in Progam Manager with one or more filenames
already specified on the "command" line (separated by spaces).
SpoolFle won't ask for filenames or copies in that case. You can
kill the completion message by putting a zero as a command line
parameter...it'll disable it for that run from the time it finds it.
For example:
SpoolFle 0 file1.prn file2.prn ... prints two files with
not completion msgs
SpoolFle file1.prn 0 file2.prn file3.prn ... prints 3 files
with a completion msg
only after the first.
You can also launch SpoolFle to print a file from within an
application program using the above syntax.
--------------------- Peliware.ini file contents ----------------------
[spoolfle]
; I'll send you a text string to enter after the '=' below to kill the
; nag screen when you register.
SerialNumber=
; To specify a default file template to be used when SpoolFle asks you
; for a file name, create a line like the one below (without the semi-colon
; which makes it a comment) in the form something.something, for example
; *.prn or *.txt or myout*.*
;
;DefaultFilter=*.xyz
; The "Don't ask this anymore" check-box on the copies dialog creates
; an entry at the end of this file to kill the copies dialog.
; The entry looks like this: CopiesDialog=0
; Comment it (precede it with a semi-colon the restore the copies dialog.
; Uncomment this (remove semi-colon) to kill message after successful
; spooling operation.
;
;CompletionMessage=0
;LastInFileDirectory=<== used to keep track of last input path
;
------------------------------------------------------------------------
This program has been extensively tested by me and friends, but YMMV,
depending on printer driver. It has also been checked for proper
citizenship using Bounds Checker, the finest programming tools known
to man and pelican.
------------------------------------------------------------------------
You are free to try this program for 30 days.
If you decide to use it thereafter, you are obligated to send $10 to
PAUL POELLINGER
2019 Round Lake Drive
Houston, TX 77077
Texas Residents, include 8.25% sales tax (total = $10.83).
-- OR --
register via Compuserve's shareware registration service by typing
GO SWREG at the prompt. I charge $12.00 for registering this way
cause Compuserve gets 15%...guess shareware means everyone who can
gets a share :-( ... TX residents, I'll eat the tax. The SWREG ID
is 3636.
When you do, I'll send you what you need to kill the nag screen.
This is a text string serial number that you will have to enter into
the Peliware.ini file in the directory where SpoolFle is stored.
Please include your e-mail address if you have one (automatic with SWREG)
...unless you say no, I'll send your serial number via e-mail.
I can reach any internet email-enabled online service. I'll use
snail mail if you request or do not have an email address.
Please note that even if you paid for a diskette or CD containing
this package, you must still pay my registration fee for use of
SpoolFle past the 30 day free trial. The fee you paid for the CD
or diskette is someone else's "share" :-(
I and all those dependent on me thank you.
------------------------------------------------------------------------
You are free to pass this TRIAL package on to others or upload it to
bulletin boards provided that 1) you do not charge for it above
the cost of distribution, and 2) all parts of the package are
included (see "included" at the top).
Naturally, you're not allowed to pass on the peliware.ini file with
your serial number in it (Having to say that always reminds me of the
local commercial that finds it necessary to state that the
all-you-can-eat-ribs offer is for dine-in-orders only :-)
-------------------------------------------------------------------
Thank you for supporting shareware.
-------------------------------------------------------------------
And thanks to Microsoft for leaving stuff like this out of Windows
so we bottom-feeders can eat too.
-------------------------------------------------------------------
Multi-user licenses are available for:
up to 50 users................$250
Unlimited.....................$400
Source code is available for $500.
-------------------------------------------------------------------
I used Borland C++ 3.x to develop this stuff. I have not yet
installed BC++ V4.0...so I can theoretically sell over 10,000
copies.
The next version will use 4.0, so you'll not be able to use this
program as an operating system or in competition with any Borland
product, and of course I'll have to limit you to less than 10,000
copies.
------------------- Peliware Commercial Break ---------------------
**************** other offerings you might like ******************
-------------------------------------------------------------------
WINPTR.ZIP/Bin Bytes: 199472 on many compuserve forums and America
On Line. And on CICA, SimTel and Garbo Internet ftp sites and mirrors
(as wprt10*.zip)...e.g: oak.oakland.edu in /pub/msdos/windows3
Title : Capture,print,control printer w/icon/hotkeys
Keywords: PRTSC PRINTER SCREEN WINDOW CLIENT CLIPBOARD CLIP FILE FAX
DEFAULT
Send screen,window,client or rectangle to printer,clipboard,file or
fax. Send clipboard contents to printer,file or fax. Print files. Load
files to the clipboard. Text,bitmaps or metafiles. Assign a new default
printer. Change to portrait/landscape. Route all printer output to files.
View or clear the clipboard. See what printer is current and its
orientation on icon. ALL FROM A SINGLE ICON loaded with windows. Most
via HOTKEYS. Shareware $20.
----------------------------
I've been selling a group of simple utilities for screen and
clipboard printing and printer orientation control (PPrint/Prtsc,
PClip/PrtClip, and Portland), collectively called WinPrt, for
some time. Look for them in the WINSHARE and MSBASIC fora of
Compuserve (search for WINP*.ZIP for latest version).
----------------------------
Look for PPRTR*.ZIP in WINSHARE, MSBASIC or POWERSOFT on CIS,
in the SOFTWARE section of AOL, or on fine FTP sites everywhere
(e.g. oak.oakland.edu in /pub/msdos/windows3) on the Internet
for a DLL providing advanced printer control to higher level
languages (like Visual Basic or PowerBuilder). $10 a developer.
Royalty-free distribution in any case.
----------------------------
Another dll provides font and font family enumeration as well
as font textmetrics to the same crowd...same deal...same places.
PPFONT.ZIP.
----------------------------
Finally, for now, look for PB3Ico.zip in the POWERSOFT forum or
on PowerSoft's BBS for a hotkey icon that delivers any and all
PowerBuilder function syntax into your editor using hotkey and
menu navigation...making the manual grab obsolete. Same deal
as WinPtr (see above).
-------------------------------------------------------------------
Let me know if you have any trouble or suggestions.
Paul Poellinger
Code Wallah
Silent O Software
Purveyors of Peliware
pelican@onramp.net Compuserve: 70732,3576 AOL: PFPelican
9/18/94
------------------------- EOJ -------------------------------------