Programming With Virtual Printer Driver

LEADTOOLS Virtual Printer Driver classes allow you to capture print jobs from any other Windows application as EMF data.

With the LEADTOOLS Virtual Printer Driver classes you can:

Using the LEADTOOLS Document Writers, you can export the captured print job as any of the supported document formats.

Using Leadtools.Codecs, you can export the captured print job as any of the supported raster image formats.

The LEADTOOLS installation program installs a sample LEADTOOLS Virtual Printer for you. When you print to this printer from any Windows application, the example program will execute and you can then save the print job as a document file or raster image file.

Installing and Uninstalling LEADTOOLS Printers

Before you can use a LEADTOOLS Virtual Printer, it must be installed. To install a printer, use Install, which will make the printer available to all Windows applications. Use Uninstall to remove the printer from the system when it is no longer needed.

Getting and Setting Printer Specifications

Use the PrinterSpecifications class to control options of the printer including orientation, paper width and height, margins and more.

Locking and Unlocking LEADTOOLS Printers

By default a LEADTOOLS Virtual Printer is 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 Printer.Lock. If the printer is locked, when a user tries to print directly to the printer a message box appears saying that the printer is locked. To unlock a printer, call Printer.UnLock. To determine whether applications were prevented from directly printing to the specified LEADTOOLS Virtual Printer, call IsPrinterLocked. Only printers that were originally created with a password can be locked.

Register and Unregister Event Notifications

Once a LEADTOOLS Printer has been installed on the system, any Windows application can print to it. Your application can register to receive captured print jobs as EMF data using EmfEvent. Your application can register to receive information about print jobs using JobEvent. Your executable can sink on the events for multiple printers at the same time. Simply add an event handler for the EmfEvent and JobEvent for each printer from which you would like to receive event notifications.

Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Imaging, Medical, and Document
Click or drag to resize