Welcome to Print Wizard!
This file is here to help you get started with the 'live' or the demo version
of PrintWiz. The only difference is that the demo version will tag each
printed page with a line indicating it is printed with an unregistered
version.
***************************************************************************
FILES INCLUDED
In addition to this file (readme.txt), you should have:
* the printwiz program (printwiz.exe)
* the callable module (pwdll.dll)
* the MapiSend program (mapisend.exe)
* the Print Wizard LPD program (pwlpd.exe)
* the "What's New" text file (whatsnew.txt)
* the main documentation file (printwiz.doc)
* documentation of MapiSend (mapisend.doc)
* documentation of PWLPD (pwlpd.doc)
* Notes on faxing with WinFax Pro (winfaxpw.doc)
* two support files for filePro (printwiz.prt and printwzc.prt)
and several sample files which you can have PrintWiz print.
The file PRINTWIZ.DOC explains Print Wizard's design goals, its HTML-like
coding scheme, and how to use the various programs.
***************************************************************************
THE PROGRAM
The printwiz.exe file contains a 32-bit Windows program. It will run on
Windows 95, 98, ME, Windows NT, Windows 2000, and Windows XP.
The program is a 'console' application, which means it has no operator
interface. In most operation it is invisible. Its behavior is governed by
command line parameters.
***************************************************************************
USING PRINT WIZARD WITH FILEPRO
Print Wizard now includes two printer definition files for use with filePro
(a database system). They are:
PRINTWIZ.PRT For use with monochrome printers
PRINTWZC.PRT For use with color printers
Both are designed to be printcode-for-printcode compatible with PRT files
commonly used in filePro to support HP Laserjet and DeskJet printers, as
developed by Jim Asman. That is, if you have a filePro program or report
output designed to include printcodes from Asman's PRT files, you should be
able to substitute the above PRT files. The print data then generated will
contain Print Wizard Markup Language (PWML) tags. When that print data is sent
through Print Wizard, the printed output should be highly compatible.
In addition, printcodes are provided to allow:
* Printing barcodes
* Printing bitmap pictures
* Printing the Euro character
* Printing form overlays
To install:
* Place the PRT files in the same directory as your other printer drivers
for filePro.
* Configure filePro to use the one of the PRINTWIZ printer drivers,
and to print to a particular disk file.
* If your filePro supports the PFPOSTPRINT environment variable, do
SET PFPOSTPRINT=c:\somedir\printwzd
Otherwise, set up Print Wizard in despooler mode as documented.
Notes on usage:
* Code 3 will initialize the PW in general, but will not select a font.
This will leave PW configured to its default font, normally Courier New.
This is a good choice, because it is scalable in both directions.
* If your printout is not scaling fonts correctly, check in its control
panel setting for how it handles fonts. Generally you DON'T want to allow
font substitution, and you may need to experiment with how the driver
downloads TrueType fonts.
* If you explicitly request a font, such as LinePrinter, and the printer
does not have it (as indicated by its driver), PW will fall back to using
Courier New.
* PW uses internal bitmaps to create all linedraw characters.
* If you feed PW a file containing escape sequences, such as from a
different PRT, PW will see the escape codes and automatically revert to
printing directly to the Windows spooler.
* Windows drivers generally don't handle the printer's resident Courier
font very well. It is better to stick to Courier New. This may require
adjustment of your program, or your PRT file.
* Try running with the PRINT DEBUG feature. In PRINTWIZ.EXE, use a command
line parameter "/vDEBUG".
* Try out BARCODES. Use code 73 to initialize barcode parameters. Change
this printcode as necessary, to set a different style of barcode,
different height, etc. Then to print a barcode, use code 74, followed by
text to barcode, followed by code 75.
* Try white-on-black, code 77.
* Try printing pictures. Use code 68 to initialize (adjust as necessary).
Then use code 75, followed by base file name, followed by code 76. For
instance, as code 68 is configured, if you do code 75, then "wally "
then code 76, you'll get a picture found in "wally.gif", in the same
directory as the file being printed. You can adjust code 68 to indicate
your pictures are in a particular directory, by adding the HREF parameter.
* To do form overlays, either bitmap or PCL, you'll need to create or change
an initialization printcode, to include the OVERLAY parameter.
***************************************************************************
USING PRINT WIZARD WITH ACUCOBOL
The DLL form of Print Wizard can be used with a Windows-based Acucobol program,
to achieve auto-fit as well as fancy printing. The sample file TEST-PW.CBL
demonstrates how to do this.
Notes:
* The PWDLL.DLL must be in the same directory as the compiled cobol object
(test-pw.acu, for instance).
* The runtime configuration file must contain the line
DLL-CONVENTION 1
***************************************************************************
CHANGE HISTORY
Changes in 1.2
* Barcode
* Allow tags to stretch past one line
* Bitmaps: how to make sizing device-independent? (based on IMG_DPI)
* Allow setting manual paper size, especially length for dot matrix
printers (PAGESIZE X= Y= ). Setting only one of them assumes
X = 8.5 inches, Y=11 inches.
* ALIGN options for IMG
* HSPACE option added for IMG
* All unit assumptions based on DPI or IMG_DPI
* Handling of DPI (Dots per inch):
* Assume DPI = IMG_DPI = 120
* If we get PAGESIZE, take my assumtions (DPI=720, IMG_DPI=300)
* Allow DOTSPERINCH in PAGESIZE, BODY
* Allow IMGDOTSPERINCH in PAGESIZE, BODY
* Added BASE HREF
* Measuring line width now accounts for tags, ampersand characters,
extra CRs at end
* Margins now figured BEFORE calculating optimal character width
* Numerous bugs fixed
* RIGHTMARGIN, BOTTOMMARGIN
* We don't open a page until necessary for text. CRs, LFs after
last FF get ignored
* Bug fixed: if font width was specified (explicitly or via PrintWiz),
font generated could be too tall, resulting in lost line
* For unpaginated text, will attempt 66 LPP before 6 LPI
* RIGHTMARGIN, BOTTOMMARGIN
* 66 LPP
Changes in 1.2a:
* Fixed bug in color of rectangle (HR)
* HR outline sometimes lost right edge.
* HR now centers between margins
Changes in 1.2b:
* Deal better with an ampersand that does NOT represent a special character.
* Allow ampersand special-character entities to be terminated by
space as well as semicolon.
* Make program more robust in handling erroneous HTML.
* In PrintWiz program, allow '/i' parameter, indicating file is ISO.
Changes in 1.3:
* PrintWiz bug fixed: bitmap WIDTH, HEIGHT were using units of DPI;
now using IMG-DPI.
* PrintWiz bitmap sizing: if only one of height, width specified,
scale the other proportionally
* If file contains escape codes, go to "raw" printing.
Changes in 2.0:
* When logging the print jobs, if device is "captured" (such as LPT2:),
show where it's mapped to.
* For raw printing, change method of determining file name to write to,
to work on NT also.
* Allow character entities to contain decimal or hex representations:
Dxxx (decimal)
Hxxx (hex)
* Allow encoding of Unicode characters as above.
* Numeric parameters can be in quotes, such as
* Allow following to have relative sizes (such as 'size = -2'), percentage,
units (pointsize = 12pt), and fractional values:
font pointsize
* Break line before ampersand entities if necessary.
* Process
(Break)
* Show options if /? or illegal parameter
* Support GIF files
* WININET:
* Allow main file to be on the Internet
* Allow GIF image file to be on the Internet
* If BODY elements (text, bitmaps, barcodes, hr) found before raw text
don't print them.
* In wiz_analyze, keep track of where BODY starts
* Bug fixed in logfile handling
* When specifying printer (/p), can leave off "WINSPOOL,"
* Parameter /cnnn sets baud rate to 'nnn' if printing goes out 'raw'
* Improvements in raw print handling as in Anzio 12.
* Improved handling of logging, parameter errors.
* Make wildcarding work without specifying full path.
* Allow wildcarding when not doing keepalive.
* Allow input from stdin, indicated as file name "-"
* If bitmap image not found, print a box.
* Improvements in wrapping after image.
* Add OVERLAY option to PAGESIZE tag.
* Improve accuracy of fractional horizontal, vertical character spacing
* Also recognize as equivalent to
* Allow specification of file to print to with /f
* Allow COLOR specification on FONT
* Allow additional color names: aqua, blue, fuchsia, green, lime, maroon, navy,
olive, purple, red, silver, teal, yellow.
* Improve handling of units such as in pointsize, for
pointsize=[+|-]nnn[%|units]
* Allow units for
* pagesize (linespacing, x, y)
* body (leftmargin, topmargin, rightmargin, bottommargin)
* HR (size, width, outline, x, y)
* goto (x, y)
* font (pointsize, pitch)
* img (x, y, border, hspace, vspace)
* barcode
* When printing HR, advance one half current line spacing before and after
* Additional color names
* Improved handling of " & " in - now doesn't lose following space
* Recognize € for Euro character
* Some adjustments in point size handling made for more accuracy
* Provide as a DLL (PWDLL.DLL)
Changes in version 2.0a:
* Bug fixed in GOTO in Y direction.
* Add superscript (, ) and subscript (, ). Vertical
shift is 3/8 of current ascent. Size changes to 3/4 of current size. Note
that this may affect horizontal spacing.
Changes in 2.0b:
* Better determination of which Unicode values are wide.
* In PrintWiz.EXE, added the following parameters:
* /vLEVEL=xxx (xxx is HIGH or LOW or RAW) turns off Print Wizard
features, and just outputs at the indicated method.
You may need to force certain jobs to print RAW,
for instance.
* /vTAGS=OFF Print Wizard will do auto-fit, but will ignore, and
therefore print, all tags.
* Can now enter size in units (pt, in, etc.) for FONT SIZE as well
as for FONT POINTSIZE.
Changes in 2.0c:
* Printwiz.exe: Bug fixed in handling findfirst.
Changes in 2.0d:
* Compatible with Delphi 5
* Fax option
* Bug fixed when buffer filled.
* New option: /r
Changes in 2.2a:
* When a horizontal rule (HR) is specified with relative positioning, it is
printed relative to the basepoint of the current text line.
* Bug fixed in handling PWML with no CRs or LFs.
Changes in 2.2b:
* In Print Wizard's PCL overlay handling:
* Filter out Printer Job Language (PJL).
* PCL file can be on FTP or HTTP server.
* Print Wizard can now specify Duplex, in the PAGESIZE tag:
Other options are HORIZONTAL and OFF.
* Allow "&Euro;" as well as "€".
* Print Wizard now has a tag that behaves almost like
in that everything following is plain text, and PW won't process "<" as
a tag or "&" as an ampersand entity, UNLESS it is prefixed with a
trigger control character, normally control-Z. Thus the sequence
ctrl-Z & e u r o ;
will cause the printer to print a Euro character. The trigger character
can be overridden in the tag as
for instance, where "25" is the decimal value of the trigger character.
So a new, better, example for the print-init file would be:
Changes in 2.2d:
* Change in Print Wizard logic for determining character width:
If incoming line width < 80, and printable width < 8 inches,
if width will fit at 10 CPI, use 10 CPI.
Changes in 2.2e:
* Mini-page logic (especially for labels, etc.).
When PW is processing a print job,
IF paper source is "tractor"
AND you haven't specified orientation, paper size, etc. via tags
AND there's less than 80% of a pagefull of lines
THEN
PW sets the printer to a custom page size that is just as long
as the print job (at 6 lines per inch).
For instance, if you're using a tractor-feed printer and PW gets a
passthrough-print job of 12 lines, it will print a 2-inch page.
* Allow positioning in units of "li" = lines
* In FONT tag, allow LINESPACING
* Make LINESPACING variables REAL
* Use bitmaps for linedraw characters created with ampersand entities
* Deal better with fonts or character sets that don't exist in this
printer.
* Deal with printers (such as Oki 320) that mess up rounding when
setting custom page sizes.
Changes in 2.2f:
* Fixed bugs that caused GPFs when printer was specified in command line
* Debug goes to log
* Fixed bug in printing files containing escape codes
* Improvement in horizontal text positioning, avoiding rounding errors.
Changes in 2.2g:
* The FONT tag can now specify a BACKGROUND color. For instance:
* New color names CYAN and MAGENTA.
* In the BASE tag, a new parameter specifies the default extension for
IMG files. For instance, if you use
..
..
(just as a paragraph break so far)
..
..
..
through ..
* Recognize more characters as combining marks.
* Recognize all ampersand character entities in HTML 4.1
* Deal with more combining characters
* Deal with more composed characters
* New option causes PRINTWIZ to register itself to handle printing of
a particular extension xxx:
/vEXT=xxx
(a dot before the xxx is optional). For instance, to tell PRINTWIZ
to register itself to handle .PTW files, do
/vEXT=.ptw
* Added support for WinFaxPro API. See the winfaxpw.doc document for more
information.
* Changes in MAPISEND
- Now better copes with Outlook vs Outlook Express
- Changes to order of processing profiles and recipients
- See mapisend.doc for more information
* Changes in PWLPD
- Changes to add user front-end
- Changes for user defined multiple queue support
- Changes to allow various actions to take place based on the passed print job name / file name
- See pwlpd.doc for more information
* When printing with a printer-resident font, and a certain font width
is needed, automatically switch between similar printer-resident fonts.
For instance, an Oki 320 Turbo, told to print at "Courier 10cpi", will
switch to "Courier 17cpi" in order to print a 132-column report. Likewise,
a Laserjet III set to print in "Courier" will switch to "LinePrinter".
* Print Wizard: Improve handling of compressed pitch on dot matrix
printer (such as Courier 17cpi on OKI 320 Turbo) to eliminate print
head shuffling.
Changes in 2.4g:
* Bugs fixed in printing bitmap graphics overlays - positioning was wrong.
Changes in 2.4n:
* Bug fix as in 2.3h.
* Setting ORIENTATION=AUTO tells Print Wizard to assume portrait, but if
either number of columns or computed characters-per-inch exceeds a certain
threshhold, switch to landscape. Threshholds are settable - see printwiz.doc.
* Remove bug (introduced 2.4) that made the program stop avoiding printing
blank pages, and print some extra pages.
* Remove initial blank pages, even when an init file is used.
* DUPLEX=LEFT, DUPLEX=TOP set duplex relative to orientation, instead of
relative to paper shape.
* Bug fixed in UTF8
Changes in 2.4p:
* Make sure "nag" line shows when overlay is specified.
* Improve handling of registration of file extensions
* Added parameters: /bn /bl /bt (Binding None, Left, Top)
* Added parameters: /ol /op /oa (Orientation landscape, portrait, auto)
* Added parameter: /vOVERLAY=name
* Added parameter: /vFONT=name (or "name")
Changes in 2.4q:
* Added parameter: /e means eject at end of job
Changes in 2.5:
* Recognize
* Auto-font switching. Print Wizard now works with a primary font and one or
more alternate fonts. If a character to be printed is not in the primary
font, Print Wizard will search through the listed alternate fonts, in order,
to find a font that contains that character.
If the last listed alternate font is "auto", Print Wizard will look through
all fonts installed in Windows for an appropriate font.
The default startup has primary font set to "Courier New", and alternate
font set to "auto".
To specify fonts in the command line, use
/vFont="font1, font2, font3"
such as
/vFont="Courier new, ms song, auto"
In the markup language, do
* Bug fixed: JPEG graphics on color printers were sometimes printed in gray.
* Improvements in handling of PCL overlays, including on color laser printers.
* Print Wizard: Resetting paper length, via PWML or with mini-page logic,
will not reset width, and vice versa.
Changes in 2.5f:
* Support control of bidirectionality
* DIR=RTL, DIR=LTR on various tags
* /vRTL in command line
* NOT FINISHEd YET
Changes in 2.5h:
* Updated Systools barcode logic to 3.03
* Changed FileMode to readOnly, so read-only files could be printed.
* Now possible to do keepalive while naming only one file to print (not
wildcard).
* If we fail to delete a file, in keepalive mode, it's now a fatal error, so
we don't print that file forever.
* Allow !MAPISEND to work on files in Windows' temp directory
(eg. \windows\temp). This makes it possible to do !MAPISEND operations from
PWLPD.
* Bugs fixed where !WINFAX line didn't have trailing spaces.
* Allow !MAPISEND on URLs, LISTENs
(Listen assigns a temporary file name of "printwiz.ptw", so that extension
must be registered)
* Allow !WINFAX on URLs, LISTENs
* Make !MAPISEND, !WINFAX work when text file has linefeeds only.
* Command line parameters /T (fax to) and /X (fax number, also turns on faxing) will apply to
all files processed during wildcard or keepalive.
* Allow BMP files to be pulled from a URL.
* Allow EMF files to be pulled from a URL.
* Bug fixed in specifying OVERLAY that was a URL.
* Allow EMF or WMF as overlay. Note that as with other overlay files, the image
will be stretched to fill the entire page.
* When a font can't be found to display a particular character, display
a box with an X in it.
* Print Wizard: when specifying a list of fonts, you can PROHIBIT a font
by listing it a "-" in front, i.e.,
etc. were drawn too small.
* Apply mini-page logic if bin is "auto" (7) or "Automatically select" (15)
* Command line parameters made easier (old ones still work):
* /DEBUG instead of /vDEBUG
* /INIT=filename instead of /vINIT=filename
* /OVERLAY=filename instead of /vOVERLAY=filename
* Bugs fixed in printing OEM (DOS) text to printer-resident fonts.
* PrintWiz can now print .JPG, .BMP, and .GIF files directly, based on file
extension. File is printed as large as possible, with rotation to landscape
mode if that is beneficial.
* Allow multiple /vEXT= settings in one command line.
* Note: You can manually register a file extension such as .utf8 to print
using PrintWiz with the "/u" switch.
* Allow .JPEG as well as .JPG
* Bug fixed in printing pictures on printers with different resolutions
in each direction.
Changes in 2.5k:
* Make PWLPD behave better on XP
* Replace PRINTWIZ.PRT, PRINTWZC.PRT (for filePro) that were missing in 2.5j.
Changes in 2.5m:
* Make PrintWiz respond properly to close of window, Ctrl-break, Windows
logoff, Windows shutdown. Note: In some versions of Windows, you may need
to set the properties of the DOS window to not warn, on termination, if
app is still running.
Changes in 2.5p:
* Immediately after going into , you can come out again with
, then do another , then go back into . Necessary
for good support of filePro.
* Updated filePro support files PRINTWIZ.PRT and PRINTWZC.PRT.
Changes in 2.6:
* Allow GUTTER (in dots) in BODY. A gutter is an added margin on the left side
of odd-numbered pages, and on the right side of even-numbered pages.
* MULTIFAX: A print job can now contain multiple fax and email jobs, each one
starting with the appropriate "!" command.
* Better error handling, especially when no default printer is assigned.
* Page length guessing: If a print job contains no formfeeds, Print Wizard will
attempt to guess the page length (lines per page) by doing line pattern
analysis. Failing that, it will look for "Page 1", "Page 2", etc. Failing
that it will assume 66 lines per page (as it did before).
* Gracefully handle Close, Logoff, Shutdown events from Windows.
* In multi-column mode, avoid making a column absurdly small
(less than 1/10 inch wide).
* Be sure Program name, version number display, and only once.
* Improve process of registering Print Wizard as the print handler
for certain file extensions.
* Postnet style barcodes are now included.
* Allow character entities in hexadecimal as nnn; where nnn is
the number (previously allowed h in place of x)
* When printing with a variable-spaced font (no PITCH specified), process
different typographic space widths for Unicode characters:
* 2000 en quad = 2002
* 2001 em quad = 2003
* 2002 en space = 2003 / 2
* 2003 em space = point size
* 2004 1/3 em space = 2003 / 3
* 2005 1/4 em space = 2003 / 4
* 2006 1/6 em space = 2003 / 6
* 2007 figure space = width of zero
* 2008 punctuation space = width of decimal
* 2009 thin space = 2003 / 5
* 200a hair space = 2003 / 12
* 200b zero width space
Note that an aligned numeric column can be created by replacing leading
spaces with
* FS separators for column alignment: The control character FS (hex-1C)
can be used to realign fields, including when printing with a
variable-spaced font. Print Wizard will try to maintain an intrinsic
character width and column count. When it encounters an FS, it will
realign the printing position horizontally to column count x character
width. If the data following is numeric, special steps are taken to
ensure alignment of numeric fields.
* Better support for bidirectional (Hebrew, Arabic) text.
* If a specified font is not found, default to Arial if vbl-spaced
(Courier New if fixed), in correct charset.
* GOTO align: The GOTO tag now has an ALIGN parameter, whose value
can be "top", "base", or "bottom", indicating whether the "Y"
parameter refers to the top of the character cell, tha baseline, or
the bottom of the cell. Default is "top".
* Print Preview: If enabled, a Print Preview dialog will be presented,
showing the first page of printout. The user can see and adjust
various parameters of the printout, such as margins, characters per
inch, assumed linage, etc. User can cancel or print.
* Paper names: In the PAGESIZE tag, for the PAPER parameter, you can
now enter the name of the paper size (or its number). Allowed names
and their corresponding numbers are:
LETTER 1
LETTERSMALL 2
TABLOID 3
LEDGER 4
LEGAL 5
STATEMENT 6
EXECUTIVE 7
A3 8
A4 9
A4SMALL 10
A5 11
B4 12
B5 13
FOLIO 14
QUARTO 15
(Higher numbers are still allowed, corresponding to the Windows
standards.)
* When Print Level = Spooler, flush data out with each write.
* Bug fixed in handling of "mm" units.
* Allow mini-page logic to work when auto-orientation is on.
* Prevent mini-page logic from working if paper length is specified.
* Mini-page logic is dependent on linespacing, which is dependent on
initial font height.
* Mini-page logic will now accommodate a TOPMARGIN.
* Include debug message if we fail to open the printer, and revert
to the default printing setup.
* More options on !Winfax command
* A special version is available that includes support for a "!RUN" command,
to allow running any arbitrary program. Not generally supported, for
security reasons.
* Made overlays work in listen mode.
Changes in 2.6h:
* Bug fixed: LENGTH in PWML was being ignored.
* Started work on freeform text (not released).
* Bug fixed in setting right edge of multi-column output.
* Various bug fixes.
* Allow a space between "/p" and the printer name.
* Allow parameter "/listen", synonymous with "/vport=9100".
* In "listen" mode, with debug on, tell what machine the print job is coming
from.
* Allow "/PREVIEW" as synonymous with "/VIEW".
* Make /vlevel=raw with /ffilename work.
* Don't do printer setup on WinFaxPro.
* Deal better with text files where last line doesn't have CR or LF.
* Improved error handling.
* In PCL macros, carryover raster compression setting between pages.
Changes in 2.6j:
* Bug fixed in wildcard applied to a drive that was CD'd to a
particular directory.
* Improvements in page length guessing.
(Scored lines of different lengths but with some similarities)
* Make sure no logging messages are generated unless requested with "/l".
* When writing to Adobe PDFWriter, make "/f work"
* !Acrobat command allows generation of PDF documents (using Adobe PDFWriter),
and then emails them using MAPISEND.
Changes in 2.6k:
* More efficient handling of custom character/diacritic combinations.
* Command line parameter "/despool" added; equivalent to "/k /w /d /r"
* Added serial number/license code activation.
Changes in 2.6m:
* Bug fixed in handling IBMFBA format
* Improvement in widths of linedraw characters, especially in Print Preview.
Changes in 2.6n:
* Make sure we can fetch image files from HTTPS:// as well as HTTP://
Changes in 2.6s:
* Bugs fixed in Print Preview
* Add special treatment for Unicode 2012, 'figure dash', a dash that must be
exactly as wide as a digit.
* Handle leading negative sign in FS-aligned numeric columns.
* Misc. bugs fixed.
* BARCODE command can have ALIGN=TOP (default), ALIGN=BASE, or ALIGN=BOTTOM.
Don't combine with Y= yet...
Changes in 2.6t:
* Bug fixed in printing PostScript files.
* When run from PWLPD, in hidden mode, and an error occurs,
unhide the window to display the error.
Changes in 2.6u:
* Bug fixed (created in 2.6t) that prevented running under Windows 9x/ME/NT.
Changes in 2.6v:
* Bug fixed in despool mode: would sometimes start printing before a file was
completely written.
Changes in 2.6z:
* Bug fixed in choosing alternate font (got smaller character).
* Bugs fixed in running SampleDialog on Windows 9X in demo mode.