Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP 9000 Networking: NetWare 4.1/9000 Print Services > Chapter 4 Sending Jobs to Network Printers Using CAPTURE and NPRINT

Using CAPTURE

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Printing Tasks Handled through CAPTURE

You can use CAPTURE to perform the following tasks:

  • Set flags to redirect DOS print jobs to a network printer (or file) from an application designed to print to workstation parallel (LPT) ports.

    NOTE: In order to redirect print jobs from a default parallel (LPT) port to a serial (COM) port, you must use the MODE command in DOS. CAPTURE cannot be used to redirect jobs to a serial port.
  • Redirect print screen text to a network printer or file.

Command Syntax

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 4-1 Syntax for Common CAPTURE Tasks

Task

Syntax

Capture to network printer P1.

CAPTURE P=P1 <Enter>

Capture to print queue Q1.

CAPTURE Q=Q1 <Enter>

End a capture.

CAPTURE EC <Enter>

Hold the print job in the queue.

CAPTURE HOLD <Enter>

List the printing parameters for the job to be printed.

CAPTURE D <Enter>

Redirect printer output to a file.

CAPTURE CR=filename <Enter>

Redirect printer output to a printer.

CAPTURE P=printername <Enter>

Use print job configuration "Charts."

CAPTURE J=CHARTS <Enter>

View online help.

CAPTURE /? <Enter>

View all online help screens.

CAPTURE /? ALL <Enter>

View help for the "Banner" option.

CAPTURE /? B <Enter>

View current capture settings.

CAPTURE SH <Enter>

 

Command Parameters

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 4-2  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 Services™ software. Default is 1 copy.

Create (not available in OS/2)

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 he 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 PRINTDEF or NetWare Administrator before users can use form names or numbers.) With an invalid name or number, CAPTURE gives a warning message.

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, you can use either PCONSOLE or 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. (See "Printing with Print Job Configurations in a Different Context."))

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 LPT<number>

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 in PCONSOLE 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)

 

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.

Procedure

  1. Type

    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 redirects 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.

  • You can use the "Timeout" (TI) option to delay printing for a specified number of seconds without closing the print job and exiting the application.

    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. The default is TI=0 (Timeout disabled).

  • You can use the "Notify" (NOTI) option if you want to know when your job has been printed. For example, if a default print job configuration is being used, type

    CAPTURE P=printername TI=2 NOTI

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 <Enter>

You can add other options to these commands.

Printing Screen Displays

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

Procedure

  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.

Printing to a Different Directory Services Context

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

  • If the printer or print queue you want to use is in a different context from your current context in the Directory tree, you can specify the location of the printer in your CAPTURE or NPRINT command.

    Note that the example shows the CAPTURE command. You can do the same thing with NPRINT.

    For example:

    CAPTURE P=.P_1.DALLAS.SWRGN.HP

    (The period at the beginning indicates that the entire context is being specified.)

    To view all container objects in the tree below your current context, type

    CX /T
  • Change your context to the one containing the printer or print queue object you want to access. You can use CX to change to the correct context.

    To view the names of all printers or print queues in and below the current context, type whichever one of the following commands is applicable:

    NLIST PRINTER /N /S
    NLIST QUEUE /N /S

Printing with Print Job Configurations i n a Different Context

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

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

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 Directory 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.HP, your command would be as follows:

CAPTURE P=P_1 LPT1 J=RPT:.DALLAS.SWRGN.HP
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. For more information, see Introduction to NetWare Directory Services.

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.HP

If you do not know the job configuration's name, select the "Change Current Object" option from the PRINTCON "Available Options" menu. From the "Enter Object" field, you can press <Insert> to browse the tree. At the context you want, you can view the configurations you have rights to see.

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

  • You do not need to use CAPTURE if you use a NetWare-aware application that is configured to send print jobs to printers or print queues.

  • When setting up your Directory structure, keep printers, print job configurations, and users as close together in the tree as possible. CAPTURE is normally a very fast utility, but performance slows considerably if it is searching all around the network for objects and databases.

  • For optimal performance, use the Q=queue option instead of the P=printer option. If you specify the printer name, CAPTURE will still have to find the queue.

  • Use the S=servername option only if you are going out of your current Directory tree, not if you are capturing within your current tree. This option is intended primarily for use with NetWare for UNIX 3™ (bindery) servers.

  • If a print job is defined, CAPTURE will use all of the options in that job except those in the command line. The command line options override all other configuration options.

  • Default options include a banner page, automatic endcap, one copy, no tabs, and form feed. You can set options by specifying a print job configuration or options at the command line.

  • All options function with a preceding forward slash ("/"), but none require it except /VER and /?. No options are needed if a default printer or print queue is specified in a default print job configuration.

  • Because CAPTURE settings must be reset each time you reboot your computer, consider placing the command in the system or individual login scripts. See "Login Script Commands and Variables," in Chapter 3 of Supervising the Network.

  • NetWare Services allows you to specify the printer name instead of a print queue. You can still capture to print queues.

  • CAPTURE only sets up redirection from parallel (LPT) ports; you cannot specify a serial (COM) port in CAPTURE.

  • The NET.CFG file now includes a NETWORK PRINTERS=number option. Replace number with the number of printers (logical ports) you would like to capture at the same time (0-9). The default is 3.

    For example, if you set

    NETWORK PRINTERS=9

    the CAPTURE command can be CAPTURE L=9 even though the physical port doesn't exist.

  • If you specify a print job configuration that has a large printer mode, you may need to increase the bytes (default 64, range 0 to 254) in the PRINTER HEADER=number option. See Chapter 2, "NET.CFG Options Reference," in NetWare Client for DOS and MS Windows Technical Reference.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1996 Hewlett-Packard Development Company, L.P.