PrintDocument

ITP/Server will instruct the appropriate (word) processor to open the Src file to print this file to the specified printer. ITP/Server will automatically choose the right processor by inspecting the contents of the Src file. The extension of the Src file does not matter. The format of the Src file should be one of the file formats that ITP/Server recognizes. Refer to the description of the parameter 'Src' below.

Each processor has its own format for indicating a certain printer. Consequently, ITP/Server has a special Printer key for every supported processor. Each of these keys should be used to indicate the printer using the format of the corresponding processor.

After ITP/Server has chosen a particular processor it will pass the value of the appropriate printer key to it. If all printer keys are properly set, a single command PrintDocument can be used to print files from all supported processors to a particular printer. On the other hand, if you only need to print Src files of a single processor, you only need to specify the printer key of that particular processor.

Before you can use the word processors in ITP/Server, they must be configured. Please read the server configuration section of the ITP/Server Manual carefully.

Syntax
PrintDocument
Src(<text>)
File(<text>)
Copies(<number>)
Collate (<True or False>)
TimeOut(<number>)
WFWPrinter(<text>)
OOoPrinter(<text>)
PDFPrinter(<text>);
Parameters

Src: Required.
The file that ITP/Server will print. Currently, the following formats are supported: Microsoft Word and OpenOffice.org.

File: Optional.
If this parameter is specified ITP/Server will print to a file. The value of the parameter is the name of the resulting spool file. Any existing file will be overwritten.

Copies:
If this parameter is specified ITP/Server will request the word processor to print the specified number of copies in a single print-job. The number of copies should not exceed 32767.

This parameter is currently only supported for Microsoft Word and OpenOffice.org.

Collate: Optional, Word only. (Default setting: False).
This setting only applies when a WFW printer is used (Microsoft Word).

This setting allows you to print all pages of a copy before printing the first page of the next copy. Note that not all printer drivers support the Collate printing option of Word; the same can be said about duplex printers.

TimeOut: Optional.
The time-out for this command in seconds. If the WordProcessor exceeds this time-out the process is terminated and ITP/Server will report a runtime error.
If this parameter is omitted the appropriate default time-out value for either batch or interactive jobs is used. A time-out value of 0 disables the time-out.
This feature is currently supported for documents printed using Microsoft Word and PDF documents.

Note

One of the following parameters must be set:

WFWPrinter: Optional (Needed if Src is a Microsoft Word document).
The name and port of the printer if ITP/Server uses Microsoft Word to print Src. If this parameter is not specified ITP/Server will use the value of the constant WFWPrinter. If ITP/Server uses Word and this constant is not set ITP/Server will report a runtime error.

The printer name should be either the name of the printer and its port for local printers, or the name of the printer queue for remote printers.

Examples:

Use this to print to the PS printer that is defined locally:

WFWPrinter("PS on LPT1:")

Use this to print to the REMOTE printer queue on SERVER:

WFWPrinter("\\SERVER\REMOTE")

OOoPrinter: Optional (Needed if Src is an OpenOffice.org document).
The name of the printer if ITP/Server uses OpenOffice.org to print Src. If this parameter is not specified ITP/Server will use the value of the constant OOoPrinter. If ITP/Server uses OpenOffice.org and this constant is not set ITP/Server will report a runtime error.

The printer name should be either the name of the printer for local printers, or the name of the printer queue for remote printers.

Examples:

Use this to print to the PS printer that is defined locally:

OOoPrinter("PS")

Use this to print to the REMOTE printer queue on SERVER:

OOoPrinter("\\SERVER\REMOTE")

PDFPrinter: Optional (needed if SRC is a PDF document).
The name of the printer. If this parameter is not specified ITP/Server will use the value of the constant PDFPrinter.

The printer name should be either the name of the printer for local printers, or the name of the printer queue for remote printers.

Limitations and Known Issues:

Examples:

Use this to print to the PS printer that is defined locally:

PDFPrinter("PS")

Use this to print to the PS printer that is defined remote:

PDFPrinter("\\SERVER\REMOTE")

Note

Printing PDF document uses the Amyuni document converter products. These may only be used if you accept the terms of the ELECTRONIC END USER LICENSE AGREEMENT FOR AMYUNI DOCUMENT CONVERTER PRODUCTS AS INTEGRATED IN AIA SOFTWARE'S ITP/SERVER PRODUCT. These license terms will be presented to you during installation of ITP/Server and will be installed in the same folder as this manual (Amyuni License Terms.txt). Note, that if you decline these terms, the installer will not install the Amyuni driver software.