WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
LPQUE(filename[, LPNUM:device][, COPIES:number][, FORM:form_name][, ALIGN] & [, DELETE[:flag]])
The name of the file to be queued for output. The filename must conform to the form and restrictions imposed by the spooler device. (a)
(optional) Specifies the spooled print device to which the file is directed for output. Possible values depend on the spooler being used.
(optional) Specifies the number of copies to print. Possible values depend on the spooler being used. (n)
The FORM and ALIGN qualifiers do not affect printing on Windows unless system option #22 is set. See Printing with LPQUE in the “Windows Development” chapter of the Professional Series Portability Guide.
(optional) Specifies the name of the form you want. The default is no special forms. The format of the form name depends on the spooler being used.
(optional) On Windows and UNIX, ALIGN indicates that a spooler-defined alignment pattern is to be created and accepted by the system operator before the file contents are printed. This alignment depends on the spooler being used.
On OpenVMS, ALIGN tells the system spooler to place the entry on hold.
(optional) Specifies whether the file will be deleted after it is printed. If flag is a nonzero value, the file won’t be deleted. If DELETE is specified but flag is not specified or is zero, the file will be deleted. By default, if DELETE is not specified, the file won’t be deleted. (n)
On Windows, LPQUE is considered to be deprecated in favor of the Synergy Windows printing API. It is not compatible with remote terminal services printers and on-demand printer driver loading.
The LPQUE statement queues a file for printing by the system. This statement relies closely on the spooling facilities offered by each operating system. Not all systems provide support for each of the LPQUE options.
When specifying a filename, the default extension is .ddf. To print a file with no extension, append a period (.) to the end of the filename. For example:
On Windows, the LPNUM value must be an alpha variable specifying the printer device in the form “name, [device]”, unless system option #22 is set.
When using LPQUE with xfServer on Windows, we recommend that the client generate a print file locally and then print it on a printer accessible to the client. We do not recommend that the client print a remote file using xfServer; however, if you choose to, the printer must be attached directly to the server machine. Network printers are not supported from xfServer on Windows.
If you don’t specify the COPIES qualifier or if number is less than 1, one copy is printed.
LPQUE is not allowed on devices.
We recommend that you don't you use LPQUE from a service (such as dbssvc), but if you do, you must modify the service to run as a user account that has previously set up the printers that will be used as well as a default printer. In addition, if LPQUE is used with a remote LPQUE to xfServer or under xfServerPlus, the ENABLEUSERHIVE registry setting must be set. See Defining environment variables for a specific user for instructions on setting ENABLEUSERHIVE.
In Synergy .NET, LPQUE requires the main program to have the [STAThread] attribute; therefore, Synergy .NET can't use LPQUE within IIS. LPQUE and the underlying Windows COM/print drivers are not thread safe, so you should ensure that only one thread at a time uses LPQUE.
The Professional Series Portability Guide for more information about system option #22 and other operating system-specific implementation details of the LPQUE statement
The following example sends the file test.1st to the print queue, prints three copies, and then deletes the file.
lpque("test.lst", COPIES:3, DELETE)
The following example sends the file, which is named in the variable file, to the printer to print aligned, and with the labels form. The file is deleted after printing.
lpque(file, FORM:"1-part", ALIGN, DELETE)