Working with the LEADTOOLS Virtual Printer Driver

The LEADTOOLS Virtual Printer Driver is a virtual printer that can be controlled by applications.

Use the following functions to get or set LEADTOOLS Virtual Printer options:

L_PrnSetPrinterSpecifications

L_PrnGetPrinterSpecifications

To determine whether a printer is a LEADTOOLS Virtual Printer Driver, call the L_PrnIsLeadtoolsPrinter function.

Install and uninstall LEADTOOLS Virtual Printers by using the following functions:

L_PrnInstallPrinter

L_PrnUninstallPrinter

Before installing, fill the PrinterInfo structure with appropriate values.

By default LEADTOOLS Virtual Printers are unlocked and any application can print directly to it. However, it is possible to lock the printer to prevent other applications from printing directly to it by calling the L_PrnLockPrinter function

If the printer is locked, when a user tries to print directly to the printer a message box displays saying that printer is locked.

To unlock a printer, call the L_PrnUnlockPrinter function.

To determine whether applications were prevented from directly printing to the specified LEADTOOLS Virtual Printer, call the L_PrnIsPrinterLocked function

Only printers that were originally created with a password can be locked.

The LEADTOOLS Virtual Printer Driver provides callback functions for the following operations:

These callback functions are:

PRNEMFRGSPROC Function

PRNJOBINFOPROC Function

Before using the EMF callback function, you must register it using the L_PrnRegisterEMFCallback function. When the user no longer needs this callback function to be fired, it must be unregistered by calling the L_PrnUnRegisterEMFCallback function.

Before using the job callback function, you must register it using the L_PrnRegisterJobCallback function. When the user no longer needs this callback function to be fired, it must be unregistered by calling the L_PrnUnRegisterJobCallback function.

Your executable can sink on the events for multiple printers at the same time.  Simply use multiple calls to L_PrnRegisterEMFCallback and L_PrnRegisterJobCallback, passing different printer names for the pszPrinterName parameter in each call.

Help Version 19.0.2017.10.19
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C API Help