              FPServer: THE Fast Novell NetWare Print Server
                                Version 5.1
                     Tricks and Tips File (TRICKS.TXT)
            ==================================================
                           Skillnet Corporation
                 Novell Registered Professional Developer
             915 West Second Avenue, Spokane WA 99204-1598 USA
                     www.fpserver.com   ftp.fpserver.com
                   509-744-0900 Voice   509-744-0909 Fax
                76350,2275 CompuServe   mail@fpserver.com


===========================================================================
PURPOSE OF THIS FILE
===========================================================================

This file describes several "tricks" which can improve network printing.
Not all of them are FPServer-specific, so you may be able to implement them
even for those printers which are not driven by FPServer.

You may locate a reference to a particular issue by thinking of words which
describe it, and performing a text search.



===========================================================================
Halting Pen Plotters Between Print Jobs
===========================================================================

Most pen plotters require their media to be changed manually.  Each user
inserts their sheet, starts sending data, and removes their sheet when the
plot is complete.

But in a networked environment, it can be difficult to "catch" the plotter
between print jobs.  And since the plotter will continue to execute plot
commands, it is easy for part of the next plot to end up on the last plot's
sheet of media.

What we need is a "start next job" button, one which temporarily halts the
plotter at the end of each job until the user has a chance to insert new
media.  Once the new sheet is in place, the user would press the "start
next job" button and allow the plotter to start the next job.

Fortunately, most pen plotters recognize the Hewlett Packard Graphics
Language (HPGL).  And, fortunately, HPGL contains a command which takes the
plotter offline: "NR;" (without the quotes).  By taking it offline, this
command halts the plotter so that a new sheet of media can be inserted.
The front panel "online" button can then be used to manually restart the
plotter - in essence becoming our "start next job" button.

The HPGL offline command can be embedded in a function which the
network will send to the plotter automatically with each job.  Setting it
up requires the use of Novell's PRINTDEF and PRINTCON utilities.

We'll use the HPGL offline command in this fashion by following the steps
below.  This is a brief overview based on PRINTDEF version 1.51; more
detailed information on using the PRINTDEF utility is available from your
Novell manuals.  Also, the names used in this example are suggestions only
- you may use anything you like.

     * Log in as Supervisor and start the PRINTDEF utility.

     * From the "PrintDef Options" menu, select "Print Devices".

     * From the "Print Device Options" menu, select "Edit Print Device".

     * At the "Defined Print Devices" list, press the Insert key.

     * Type the name of our new Print Device and press Enter (in this case,
       use the name "Plotter").  Pressing Enter will return us to the
       "Defined Print Devices" list.

     * From the "Defined Print Devices" list, highlight our new function
       and press Enter.

     * From the "Edit Device Options" menu, select "Device Functions".

     * At the "...Functions" list (which will be blank), press the Insert
       key.

     * Type the name of our new Function and press Enter (in this case, use
       the name "Offline").  Pressing Enter will advance us to the data
       field.

     * In the data field, type the HPGL offline command "NR;" (a capital N,
       then a capital R, then a semicolon), and press Enter.

     * Press the Escape key, and answer Yes to save your changes.

     * Press the Escape key to exit the "...Functions" list.

     * From the "Edit Device Options" menu, select "Device Modes".

     * From the "...Modes" list, select the "Re-initialize" mode.

     * At the "(Re-initialize) Functions" list, press the Insert key.

     * Highlight our new function (in this case, our "Offline" function)
       and press Enter.  This will return us to the "(Re-initialize)
       Functions" list.

     * At the "(Re-initialize) Functions" list, press the Escape key.

     * At the "...Modes" list, press the Escape key.

     * At the "Edit Device Options" menu, press the Escape key.

     * At the "Defined Print Devices" list, press the Escape key.

     * At the "Print Device Options" menu, press the Escape key.

     * At the "PrintDef Options" menu, press the Escape key.

     * At the "Exit PrintDef" menu, answer Yes.

     * At the "Exit Options" menu, select "Save Data Base, then EXIT".

After completing the above steps, we will have created a Print Device named
"Plotter" which will send the contents of its "Re-initialize" mode to our
plotter before AND after every job.

Now, from within PRINTCON, we can create a Print Job Configuration which
specifies our new "Plotter" Device Type.  By invoking the resulting Print
Job Configuration with the CAPTURE command, we can then cause the contents
of the "Re-initialize" mode to be sent with every plot.

Like the PRINTDEF example above, this is a brief overview based on PRINTCON
version 1.52.  More detailed information on using the PRINTCON utility is
available from your Novell manuals.  Also, the names used in this example
are suggestions only - you may use anything you like.

     * Log in as Supervisor and start the PRINTCON utility.

     * From the "Available Options" menu, select "Edit Print Job
       Configurations".

     * At the "Print Job Configurations" list (which may be empty), press
       the Insert key.

     * Type the name for your new Print Job Configuration, and press Enter
       (for this example, use the name "Plotter").

     * If a warning appears regarding "no forms defined", ignore it and
       press Escape to continue.

     * The "Edit Print Job Configuration" screen will appear.  Enter data
       as shown:

----------------------------------------------------------------------
  Number of Copies:   1                 Form Name:      (none defined)
  File Contents:      Byte Stream       Print Banner:   No
  Tab Size:           <blank>           Name:           <blank>
  Suppress Form Feed: Yes               Banner Name:    <blank>
  Notify when done:   No

  Local Printer:      1                 Enable Timeout: Yes
  Auto-endcap:        Yes               Timeout count:  30

  File Server:        <see below>
  Print Queue:        <see below>
  Print Server:       (Any)
  Device:             <see below>
  Mode:               <see below>
----------------------------------------------------------------------

     * In the "Print Queue" field, be sure the name of the appropriate
       print queue appears.  The "File Server" field must specify the file
       server on which that print queue resides.

     * In the "Device" field, press Enter to see a list of available
       Devices.  One of these will be the "Plotter" Device we just created
       in PRINTDEF.  Highlight it and press Enter.

     * In the "Mode" field, press Enter to see a list of available modes
       for the "Plotter" Device we just selected.  One of these (probably
       the only one) will be "Re-initialize".  Highlight it and press
       Enter.

     * Press Escape to exit the "Edit Print Job Configuration" screen, and
       answer "Yes" to the "Save Changes" menu.

     * At the "Print Job Configurations" list, press Escape.

     * At the "Available Options" menu, press Escape.

     * At the "Exit Printcon" menu, select Yes.

     * At the "Save Print Job Configurations" menu, select Yes.

We have just finished creating a new Print Job Configuration named Plotter
which knows about, and uses, the HPGL offline command.  All that remains is
to have the user's workstation use this Plotter configuration when sending
print jobs to the plotter.

First, we must make the "Plotter" Print Job Configuration available to the
user.  Since we created it while logged in as Supervisor, "Plotter" was
placed in the Supervisor's list of Print Job Configurations.  Normally, we
must create such Configurations individually for each user; but PRINTCON
allows the Supervisor to copy Configurations from one user to another.

     * Log in as Supervisor and start the PRINTCON utility.

     * From the "Available Options" menu, select "Copy Print Job
       Configurations".

     * At the "Source User" prompt, type "SUPERVISOR".

     * At the "Target User" prompt, type the network name of the user.

     * If the "Delete Existing File" prompt appears, select Yes.

     * Back out of PRINTCON using the Escape key.

Second, we must modify the user's CAPTURE command to invoke the new
"Plotter" Print Job Configuration.  Assuming the user wishes to send data
to the plotter via "LPT1", the capture command would be:

     CAPTURE  L=1  J=PLOTTER

...which specifies LPT port number 1, and Job configuration "Plotter".  No
"Q=" or other command line switches are required, since we have already
specified the print queue and other options from within PRINTCON.

The above CAPTURE statement will cause the network to insert the HPGL
offline command before and after every plot.  This will prevent the plotter
from placing multiple plots on the same piece of media, and give users
complete control over the timing of every job.

For more information about the PRINTDEF, PRINTCON, and CAPTURE utilities,
please refer to your Novell manuals.



===========================================================================
Emulation-Switching Printers
===========================================================================

Many printers are now equipped with multiple "emulations", or printer
languages, such as Hewlett Packard's PCL or Adobe's PostScript.  Most of
these printers allow you to switch between the emulations in software - but
you must send a special software command to do so.

A variation on the PRINTDEF scheme for pen plotters (see above), when used
with FPServer's PostJobDelay feature, can be used to AUTOMATICALLY switch
between different printer emulations.  And contrary to popular belief, you
do NOT have to use multiple queues for multiple emulations; the scheme
described below will allow you to freely mix jobs of different emulations
within the same NetWare print queue.

This example will be based on the Hewlett Packard LaserJet IIIsi, which
ships with the PCL language and can optionally include a PostScript module.
Keep in mind that your printer may require different data to switch between
emulations.

The following strings switch between emulations on an HP IIIsi:

     Switch to PCL: <ESC>%-12345X@PJL ENTER LANGUAGE=PCL<LF>
     Switch to PS:  <ESC>%-12345X@PJL ENTER LANGUAGE=POSTSCRIPT<LF>

...so we must arrange to have those strings sent to the printer before each
type of job.  That way, the jobs may be freely mixed in a single print
queue.

The discussion in the Pen Plotter section (see above) pointed out that
PRINTDEF's default "Re-initialize" function can be used to send a setup
string with every print job which invokes that Device Type.  So the trick
is to create two PRINTDEF Device Types.

The first will have the PCL command in its "Re-initialize" mode; the second
will have the PostScript command in its "Re-initialize" mode.  Then we can
switch between emulations just by invoking the correct Device Type.

Create the PCL Device Type first.  Follow the procedure outlined in the
"pen plotter" PRINTDEF example earlier in this file, using appropriate
Device and Function names such as "HP in PCL" and "Switch to PCL".

When asked for the Escape Sequence, enter the data string which switches
your printer to PCL.  For an LaserJet IIIsi, it would be:

                 <ESC>%-12345X@PJL ENTER LANGUAGE=PCL<LF>

Next, create the PostScript Device Type, using appropriate Device and
Function names such as "HP in PostScript" and "Switch to PostScript".

When asked for the Escape Sequence, enter the data string which switches
your printer to PostScript.  For an LaserJet IIIsi, it would be:

                 <ESC>%-12345X@PJL ENTER LANGUAGE=POSTSCRIPT<LF>

Now we have the ability to send the emulation-switching strings to the
printer.  All we have to do is make the user's workstation use them.  And
we can do that by invoking the newly-created Device Types via Novell's
PRINTCON utility, again just like we did with the "pen plotter" example
earlier in this file.

Start PRINTCON and create two new new Print Job Configurations, one named
"PCL" and the other named "PostScript".  Inside the PCL configuration,
specify our new "HP in PCL" Device Type and the "Re-initialize" mode.
Specify the "HP in PostScript" Device Type and its associated
"Re-initialize" mode in the PostScript configuration.  Save your changes
and exit PRINTCON.

Finally, run two CAPTURE statements on the user's workstation.  For
example, the first might be:

     CAPTURE  L=1  J=PCL

...and the second might be:

     CAPTURE  L=2  J=PostScript

Now, the user can print PCL jobs by sending them to LPT1.  PostScript jobs
can be handled by sending them to LPT2.  Users can print in either
language, simply by directing their output to the appropriate LPT port and
letting the network handle the details!

And, both types of jobs mix freely in the same print queue.  All jobs
pending for that printer can be reviewed from within FPServer, Novell's
PCONSOLE, or other queue-viewing utilities.

Final Note: Some emulation-switching printers need an idle period
between jobs.  This "dead time" tells them when to start analyzing the data
stream again, or in some cases it gives them sufficient time to switch
mulations.  FPServer's portPostJobDelay= command was specifically designed
to enforce such a delay between successive jobs.  Please see the
FPSERVER.TXT file for more information on this command and its use.



===========================================================================
Using Multiple Forms with FPServer
===========================================================================

FPServer makes it easy to use multiple forms.  The method described below
also makes it easy for users and System Administrators to review the number
and size of jobs waiting for a certain type of form to be loaded.

The keys to FPServer's easy forms support are its ability to cleanly
terminate to DOS, and its ability to be reconfigured from the command line.
Since FPServer's configuration file can be overridden by commands on the
command line, you can use batch files to temporarily alter FPServer's
operation - without running any configuration software, and without editing
any configuration files.

For this example, assume we need to print on letterhead, checks, and
invoices.  Also assume that, most of the time, we print on standard paper
and send our print jobs to a print queue named DOTMATRIX with the following
CAPTURE command:

     CAPTURE  L=1  Q=DOTMATRIX

...and that FPServer's configuration file routes the contents of the
DOTMATRIX queue to a printer on FPServer's first parallel port with the
command:

     LPT1QUEUE=FILESERVER/PRINTSERVER/DOTMATRIX,<softkey>

The first step is to create a separate print queue for each form type.  Use
Novell's PCONSOLE utility to create the print queues, and give them names
which indicate the associated forms.  For example, if we need to print
letterhead, checks, and invoices, we would create three queues with the
names LETTERS, CHECKS, and INVOICES.

Next, create three batch files on the PC which runs FPServer.  Name them
LETTERS.BAT, CHECKS.BAT, and INVOICES.BAT.  Each batch file will contain a
single line which starts FPServer and overrides its default configuration.
For example, the LETTERS.BAT file will contain a single line reading:

     FPSERVER LPT1QUEUE=FILESERVER/PRINTSERVER/LETTERS,<softkey>

...and the other two batch files will be identical except for the name of
the print queue.

Finally, make changes to the user's CAPTURE statements or applications
software as necessary to have the various types of print data sent to the
correct print queue.  Those applications which print checks should send
their output into the CHECKS print queue, and so on.

Now, when users need to print to a special type of form, they simply send
the print data into the queue with that name.  Jobs can stack up during the
day until it is convenient to change forms.  Users and the System
Administrator can review the number and size of pending jobs by using
Novell's PCONSOLE (or any similar utility) to view the associated print
queue.

When it's time to switch forms, we simply walk over to the print server PC
(the one running FPServer) and:

     * Press Escape to exit to DOS;
     * Change the forms in the printer; and
     * Type the name of the form and press Enter.

Since the name of the form is also the name of the batch file, the
portQUEUE= command in the batch file will override the one in the
FPSERVER.CFG file.  The print server will begin servicing jobs from that
print queue, which are intended for that type of media.  Meanwhile, jobs
intended for the other media types will be stored in their respective
queues, ready to be printed when THEIR media is installed in the printer.

To run invoices with our sample setup, any user could walk over to the
FPServer print server, press Escape, install the invoice forms, and type
INVOICE <enter>.  Invoice jobs would begin printing immediately.
