Please enable JavaScript to view this site.

TIFF Image Printer

Description

Sets the active printer used by the session and the number of temporary printers to create in the printer pool. Having more than one printer in the pool of printers allows more than one file to be submitted at a time. While you can have as many printers in your pool as you want, care must be taken to balance the number of printers with your system resources.

Syntax

expression.SetSessionPrinter(ProcessId,PrinterName,PrinterPoolSize,

                             PrinterPoolBaseNameOptional,PrinterPoolProfileOptional)

where expression is an IPNSession object.

Parameters

Integer ProcessId

The process id of the current process using the PNSrv12Lib. This allows PNSrv12Lib to monitor the running process and ensure all COM objects, references and printers are cleaned up if the current owner process unexpectedly crashes or is terminated.

String PrinterName

The name of the printer to use. Can be one of TIFF Image Printer, PDF Image Printer, or Raster Image Printer. The respective printer must be installed on the computer.

Integer PrinterPoolSize

The number of printers to create in the printer pool.

String PrinterPoolBaseNameOptional

Each printer is created with a unique GUID name, and is deleted when all references to this process's IPNSession are closed.

An optional prefix can be added to each GUID printer name to make the printers visually recognizable; this is useful if you have more than one process running and using PNSrv12Lib. The prefix can be combination of letters and numbers that create a valid printer name. '\' and ',' are not valid.

Pass empty string if you are not using this.

String PrinterPoolProfileOptional

Full path to the conversion profile to be used by all printers in the pool.

Conversion profiles are created and exported using the printer's Profile Manager utility. Once saved on disk, they can then be used from PNSrv12Lib. Exported profiles end with pntifprofile.

This can be overridden later using SetPrinterProfile or the property methods. Pass an empty string if you are not using this. If not set, the default system conversion profile for the printer is used.

Exceptions

An exception will be thrown if any of the following is true:

The printer cannot be found; check that the printer exists and that the printer name is spelled correctly

You do not have sufficient privileges to create copies of the printer, or to create local printer ports

SetSessionPrinter is called more than once on a single IPNSession object

Supported Printers: TIFF Image Printer, PDF Image Printer, Raster Image Printer

See Also: NewPrintSession, SetPrinterProfile