Setting Up CAPTURE for Applications Not Designed for Network Printing

Many applications are designed for network printing. For example, WordPerfect* submits print jobs directly to the print queue. Because you can specify the number of copies, a banner page, and so forth from inside such applications, you do not need specialized NetWare® utilities to send network print jobs. Such applications usually supply the necessary print driver (control sequences, functions, etc.) and include it with each network print job.

However, there are many applications that are not designed for network printing. CAPTURE is a command line utility that allows you to print from applications not designed for NetWare print services. It sets up redirection parameters for printing output from your workstation; the NetWare DOS RequesterTM software then redirects the workstation output from an LPT port to the specified network printer or file.

For specific information see the following discussions:


Printing Tasks Handled through CAPTURE

You can use CAPTURE to perform the following tasks:


Command Syntax for Using CAPTURE

The following example represents a typical CAPTURE command:

CAPTURE [P= printername | Q= queuename] [L=1 or LPT1] [ options]

For example, to redirect the LPT1 port to printer P_1 with no banner or form feed, type

CAPTURE P=P_1 L=1 NB NFF

If you are using a print job configuration, you do not need to specify other options except to override options in your job configuration:

CAPTURE J=JOB1

Material sent to the LPT1 port (for example, print screens or DOS piping) will now print at printer P1. To end the capture, type

CAPTURE L=1 EC


Table 6. Syntax for Common CAPTURE Tasks

Task Syntax

Capture to network printer P1.

CAPTURE P=P1

Capture to print queue Q1.

CAPTURE Q=Q1

End a capture.

CAPTURE EC

Hold the print job in the queue.

CAPTURE HOLD

List the printing parameters for the job to be printed.

CAPTURE D

Redirect printer output to a file.

CAPTURE CR=filename

Redirect printer output to a printer.

CAPTURE P=printername

Use print job configuration Charts.

CAPTURE J=CHARTS

View online help.

CAPTURE /?

View all online help screens.

CAPTURE /? ALL

View help for the Banner option.

CAPTURE /? B

View current capture settings.

CAPTURE SH


Command Parameters for Using CAPTURE

Replace option with one or more of the following. The options help you define how a job is printed. Separate options with a space or forward slash (/). Options are not case-sensitive.


Table 7. CAPTURE Options

Option Syntax Description

All

ALL

When used with the End Capture (EC) option, it ends the capture of all LPT ports. Used with the /? option, it displays all online help screens.

Autoendcap
(End capture automatically)

AU

Specifies that the captured data be closed and sent to the printer when you exit an application.

Default: Autoendcap enabled

Banner

B=text

Indicates what will appear in the lower half of the banner page. Limit is 12 characters. Replace text with any word or phrase up to 12 characters long. To allow spaces in a banner name, enclose the name in quotation marks (for example, ON THE GO)

Default: The captured port (for example, LPT1)

Cancel

CA

Used in conjunction with the EC option. Ends the capture of data to LPT ports and discards the data that was being captured.

Cancel and end capture

ECCA

Ends the capture of data to LPT ports and discards the data that was being captured. If the CReate (CR=) option was used in the original Capture statement, the file is closed but not discarded.

Copies

C=number(1-65,000)

Specifies the number of copies. CAPTURE allows up to 65,000 copies in NetWare 5TM software. Default is 1 copy.

Create

CR=path and filename

Creates a file in which to store printed data. This option can be used only with the TI=, AU, or NA options.

Details

D

Lists the printing parameters for a capture. It also indicates whether a print job configuration was used.

End capture

EC

Ends the capture of data to an LPT port. When used in conjunction with the L=number option, it ends the capture to the port number specified. When used without the L= number option, it defaults to the LPT1 port. When used with the ALL option, it ends the capture for all LPT ports. If data was being captured to a network file, the file is closed.

The CA option can be used with this option to end the capture of data to LPT ports and discard the data that was being captured.

Running CAPTURE again will end the current capture and assign new values.

Form

F=name or number

Specifies the form that the printer will use. (You must define forms using NetWare Administrator before users can use form names or numbers.) With an invalid name or number, CAPTURE gives a warning message.

Default: F=0

Form feed

FF

Enables form feed after your print job has been printed. FormFeed enabled means that the printer starts printing the next job at the top of the next sheet of paper. However, if an application automatically enables form feed at the end of a file, adding this option causes an extra blank page to be fed through.

Default: FormFeed enabled

Help

/? or /H

Displays general help information. Specific options are displayed for certain utilities on the initial help screen.

Hold

HOLD

Allows you to send a print job to a queue without having it print. To release the hold on the job, use NetWare Administrator.

Job configuration

J=name

Indicates the print job configuration to use; does not require other options except to override print job configuration options. If no job configuration is specified and a default job configuration exists, it will be used. (Use the Details option to see what job configuration is being used.)

If no default print job is used, you will need to specify either a printer or queue in the command line.

You can also use this option to specify the context in which to look for a print job configuration if it is outside the current search path by identifying the container or user owning the configuration.

Keep

K

Ensures that the NetWare server keeps all data it receives from your workstation if your workstation hangs or loses power while you are capturing data to the server. When the server notices your workstation is no longer connected, it sends the data it received from your workstation to a print queue for printing. Use this option if you plan to capture data over several hours.

If you do not include the Keep option and your workstation hangs while sending data to the captured port, the NetWare server discards the data it has received.

LPT port

L=number (1-9) or LPTnumber

Indicates the local LPT port you want captured. You can set network printers in your NET.CFG file by using the command NETWORK PRINTERS=number (1-9).

You can specify LPTn instead of L=n.

Name

NAM=text

Indicates what will appear in the upper half of the banner page. Limit = 12 characters.

Default: The username you used to log in

No autoendcap
(Continue capture)

NA

Specifies that the captured data not be closed and sent to the printer when you exit an application. This allows more information to be added to the print job.

When this option is used, the capture will not close unless you also specify TI= in the command. Otherwise, you must issue an EC command to close the capture.

No banner

NB

Suppresses banner page.

No form feed

NFF

Suppresses form feed at the end of a print job.

No notify

NNOTI

Specifies that the user not get a message after the print job prints. Do not confuse this option with the notification option that informs designated users when the printer is having problems.

Default: NoNOTIfy enabled

No tabs

NT

Specifies that tabs are not converted to spaces in a print job. This is also called byte stream. This option ensures that all the tab characters in your print job arrive at the printer unchanged. Use this option for most network printing situations, especially when printing graphics. Default is NT (byte stream).

Notify

NOTI

Specifies that the user get a message after the print job prints. This option does not notify you if the printer has a problem or if your job cannot be printed.

Printer

P=name

Indicates to which printer the print job should be sent; you may set a default in a print job configuration. Do not use this option with the Q= option.

Queue

Q=name

Indicates to which print queue the print job should be sent; you may set a default in a print job configuration. Do not use this option with the P= option.

Server

S=name

Specifies the NetWare server if you want the print job sent to a bindery print queue. Not used for Directory Services print queues. Default = current tree or server.

Show

SH

Shows the current status of LPT (parallel) ports. Do not use with other options.

Tabs

T=number (1-18)

Specifies the number of spaces to be substituted for each tab in a print job (default=8). Specify NT (No tabs) for byte stream print jobs.

Timeout

TI=
number(0-1000)

Specifies the number of seconds to wait after the last data is received before closing the print job.

If your timeout is not long enough, you may have problems printing some files, especially files with graphics. Increase the timeout if only parts of files are being printed or if the files do not print at all.

Default: TI=0 (TImeout disabled)

Version

/VER

Displays version information for this utility. Also lists the names and version number of all files required to run this utility.


Using CAPTURE When Printing to a Network Printer

To print to a network printer from an application that is not designed to run on a network, follow these steps.

  1. Type the following at the command line:

    CAPTURE P= printername TI= number LPT1

  2. Enter your application.

  3. Either open or create the files you want to print.

  4. Print your data using the print keys for your application.

    Your application sends the print job to the parallel ports. Before the print job arrives at the port, CAPTURE sets flags that redirect the job to the appropriate queue.

  5. When you have finished printing the files you need, exit the application.

    In most applications, printing begins immediately after you send the job.

    • If Autoendcap (AU) is enabled, your job is queued when you exit the application.
    • If Timeout (TI) is enabled, the job is sent to the print queue in the specified number of seconds.


Printing Data without Exiting an Application

In most applications, printing begins immediately after you send the job.

Two seconds after the application last writes to the file, CAPTURE sends your print job to the print queue. A message appears across the bottom of your screen indicating that your job has been printed.


Printing Data to Different Parallel Ports

Suppose you often use CAPTURE to print from two different applications: AppA and AppB. AppA does not allow you to designate which parallel port to send print jobs to; therefore, its print jobs are sent to LPT1. However, AppB has a SETUP program that allows you to designate a parallel port.

Suppose also that AppA requires a different form than AppB and that you want to put form A (for AppA) in printer P_1 and form B (for AppB) in printer P_2.

Use the SETUP program in AppB to send your data through LPT2 to printer P_2. When you capture data from AppA, type

CAPTURE LPT1 P=P_1

When you capture data from AppB, type

CAPTURE LPT2 P=P_2

You can add other options to these commands.


Printing Screen Displays

To print information displayed on your screen, follow these steps.

  1. Before you access the screen you want to print, type

    CAPTURE P= printername TI= number LPT1

    You can include any of the CAPTURE options except SHow.

  2. Access the screen you want to print.

  3. Press Shift+Print Screen.

    NOTE:  DOS redirects print jobs to the port. If no printer is attached or port captured, your machine may hang. To prevent this, include the following line in the NET.CFG file on your workstation boot diskette:

    LOCAL PRINTERS = 0


Saving Data from Several Applications or Files to a Single File

Suppose you want to move in and out of applications or files, saving data from each, and store all the data in one file called TEST on a network drive.

Use the Create (CR) and the No autoendcap (NA) options. Specifying No autoendcap allows you to move in and out of applications or files without prematurely closing the file you are creating.

To save data to a file to your current directory, type

CAPTURE CR=TEST NA TI=0

To save data to a file called TEST that is located in the REPORTS directory, type

CAPTURE CR=COUNT_SYS:SALES\REPORTS\TEST NA TI=0

To end the capture, type

CAPTURE EC


Saving Data to a NetWare Server You are Not Attached To

If you specify a NetWare server you are not attached to in your CAPTURE command, CAPTURE attaches you as user GUEST unless GUEST requires a password. In this case, you are prompted to enter both a username and a password before you continue with the capture.


Using CAPTURE When Printing to a Different NDS Context

If you want to print to a printer or print queue in an NDSTM context different from your current context, you can accomplish this in one of the following ways:


Using CAPTURE When Using Print Job Configurations in a Different Context

Occasionally, you may want to send print jobs using a print job configuration in another context.

In releases prior to NetWare 4.02, searches for print job configurations were limited to your current context and the context immediately above it in the NDS tree.

Beginning with NetWare 4.02, a new feature was added to the J= flag in CAPTURE and NPRINT that allows you to use a print job configuration anywhere in your NDS tree, so long as you have the rights to do this.

By using this feature, you can limit your search for the specified job configuration to a specific context or to the owner of the database that contains the configuration.

Note that the examples show only the CAPTURE command. You can do the same thing with NPRINT.

The syntax for this feature is as follows:

CAPTURE J= jobname: context

For example, to use printer P_1 to print a document using print job configuration RPT located in container object .DALLAS.SWRGN.NOVELL, your command would be as follows:

CAPTURE P=P_1 LPT1 J=RPT:.DALLAS.SWRGN.NOVELL

NOTE:  Placing the period in front of the container name indicates that you are specifying an absolute context path; that is, you are showing the context all the way up to the root. If you want to specify only a relative context path (one that does not go all the way to the root) you should not use the period.

You can specify any context anywhere in the tree, so long as you have rights to the context or user you specify.

If you specify a user rather than a context, the command syntax is as follows:

CAPTURE J=JOB1:CN= username.SALES.NOVELL


Adding CAPTURE to Login Scripts

You can add a CAPTURE command to the container login script or to a user login script. For example, in the login script, type

#CAPTURE Q= queuename TI= n

or

#CAPTURE Q= queuename AU

You can include any other command options you want. If you include the TImeout or Autoendcap option in the login script, to print a screen display for example, you only need to press Shift+Print Scrn.

If you type a CAPTURE command at the DOS prompt, it overrides the command in your login script if you capture the same port.


Container Login Script

Suppose you want to include a CAPTURE command in the container login script for group SALES so they can use printer P_0. Add the following lines to the container login script:

IF MEMBER OF SALES THEN BEGIN

#CAPTURE P=P_0 options

END

Note that in the above example, if you are using a bindery queue, you would have to add a server name to your parameters (for example, S=SALES-PRINT).


User Login Script

Suppose a user often prints from a non-network application by using CAPTURE. The user wants to send a file to printer P_1, which is servicing queue Q_1. The user wants to print the file without a banner or a form feed and releases this job to the print queue five seconds after the application last writes to the file.

Add the following lines to the user login script:

#CAPTURE P=P_1 NB NFF TI=5


Tips on Using CAPTURE