Please enable JavaScript to view this site.

TIFF Image Printer

Description

Not all applications have the ability to choose a specific printer and rely on the system default printer when printing.The default printer is a global setting; when you set the default printer, it is set for the entire system. When printing in a multi-threaded environment, care must be taken to share the default printer setting between the threads to ensure that one thread is not changing the default printer while another thread is about to print to the default printer.

The MakeSystemDefaultPrinter method sets the printer associated with this print session as the system default printer and blocks any other IPNPrintSession printers from becoming the default printer, allowing for thread-safe printing from applications that rely on the system default printer. When this print session is released back into the pool of available printers, the original system default printer is restored.

Note:

If at all possible, try to avoid having to set the default printer. Even when using MakeSystemDefaultPrinter to control the default printer, you cannot protect against the default printer being changed by an outside process or manually by a user. As well, having to share the default printer, a single resource, between multiple threads can slow down processing.

Syntax

expression.MakeSystemDefaultPrinter()

where expression is an IPNPrintSession object.