Skip to main content

Adjusting Output with "init" Files

Regardless of how Print Wizard is invoked, it is possible to specify a print initialization file. This file should be a plain text file, created with an editor such as NOTEPAD or EDIT. Whatever is in the initialization file will be inserted onto the beginning of the data file. The initialization file can contain escape sequences, or, more commonly, PWML initialization tags. It can also contain actual text and/or graphics to be printed at the beginning of the print job.

The file can be located on a local or networked disk drive, or it can be on an HTTP, HTTPS, or FTP server.

If the file contains escape sequences, that will force Print Wizard to switch to spooler mode, so that the initialization file and then the data file will be sent at a very low level to the printer, bypassing the Windows printer driver. The escape code sequences must be appropriate for the kind of printer involved. This is a less-common use of printer initialization files. (It would also be possible to do PCL translation of these codes.)

More often, the file will contain PWML tags. These can initialize the Print Wizard process, establishing job-level parameters such as paper selection, orientation, font, overlay, etc. The initialization file will generally leave the print process in a mode such as PRE or LEGACY.

For instance, the following initialization file will cause reports to print in landscape mode, with an assumed length of 60 lines per page (if there are no form feeds), with a top margin of ¾ inches:


The following file would cause reports to print with a bitmap form overlay, and text margins set to 1 inch at top and left:

Note that line breaks before ,

, , or  are ignored (both in the initialization file and in general usage). Furthermore, a single line break at the end of the initialization file is ignored.

The SAMPLES directory contains some sample print-init files. The file “LETTER.INIT” initializes Print Wizard to letter-size paper (8.5” by 11”), auto orientation, with convenient margins. The file “LABELS.INIT” initializes Print Wizard for 2-column labels. Files starting with “Gaylord” are for laying out labels on standard labels as sold by Gaylord, a library supply company. You can use these files as starting points for your own experimentation.

Init files with services

Since Print Wizard Services and Windows Services for Print Wizard both utilize the Print Wizard engine, it is possible to also use an "init" file with any service. There are two options here, one is to adjust the command line for the job that will be spawned and the second is to actually set a profile up that uses that "init" file.

Changing the default behavior of the service

To do the first, when setting up the Print Wizard service, you would change the "spawn" string found for that service. By default when you run a Print Wizard or Windows Service, and the "spawn" string is empty, Print Wizard engine is fired off with default settings allowing the job to run. You can override this setting with the "spawn" string, however, you have to put in the full program string and parameters you wish to run, i.e.

"c:\program files\printwiz30\printwiz.exe" /minimize /q /vdocname=PWDoc /init=MyInitFile

By doing this with an "init" file name, you can override the defaults.

With a Print Profile

The simpler and preferred approach is to set up a Print Profile and point to an existing "init" file name. To do this

1) Go to the Print Wizard User Interface and select the "Setup profiles..." item under the Tools menu. Add a new profile and go to the Properties for that new profile. Under the Print Wizard tab, enter an "init" file name (or press the "..." button after the field to browse for a file name). Say OK to each dialog to get back to the main window.

2) Go to the "Setup services..." item under the Tools menu, select your service and go to the Properties dialog.

  • If this is a despool or listen type service, under the Options tab, you can select the Print Profile to use.
  • If this is an LPD service, select your queue and under its Properties you can select a Print Profile for that particular queue to use

With the service pointing to a profile, any print job received will utilize the settings in that Print Profile.

Copyright © 2024 Rasmussen Software, Inc. Legal Information & Privacy Policy
Send comments and suggestions to rsi@anzio.com