Image Printer Driver Help

 

Printer Driver Architecture

The following diagram shows the architecture of the printer driver. The driver is a standard Microsoft Windows Printer Driver that interfaces to a DLL that is called the "Exit32.dll". Exit32.dll receives bitmap data from the driver for each band of a document page. The bands are assembled into a complete page by Exit32.dll and then written to a file. The standard Exit32.dll supplied with the driver creates a multi-page TIFF file and stores it on your hard disk.

 

         

With the Exit32.DLL included in the package, you can preview prints from any Windows application, including your own.

The base product produces a multipage TIFF file and launches the application you have specified as the default viewer for files having extensions of .TIF. Registering the product gives you the source code for the DLL called by the driver. The DLL receives each page of the print job as a bitmap. You can modify the source code to do whatever you want with the bitmap delivered from the driver. The source code is compatible with Visual C++ V6.0.

You can intercept pages from any Windows application and perform any kind of image processing, indexing, or print redirection you like.

For example, you can stamp any document the user prints with the name of the user, the user's signature, or date/time before sending the printout to a real printer.

The demo version of the driver displays a dialog box for each print job but is otherwise the same as the registered version.

There are optional Exit32.dll versions available for rendering documents to bitmap (.bmp) or JPEG (.jpg) files. Since these file formats do not support multip pages, all of the pages for a document are stored in a folder in a separate file for each document page.

 

Configuration File

The Exit32.dll reads and write a configuration file named "nedprint.ini".

This file is optional and can be used to monitor the operation of the print job. Nedprint.ini must be located in the Windows directory. On most machines this would be the c:\Windows folder.

An example nedprint.ini file is shown here:

[File]
;The driver writes this tag to let you know the job is done. Delete this tag from
; your application, or manually, then check for it to match what you specify in
; the path tag below. When it matches, the print job is done.
Written=c:\myimage.tif< BR>
; Uncomment the following line to write the image where ever you want
path=c:\myimage.tif< BR>
[options]
; This line tells the driver to open the image viewer. Set to 0 or comment out
; to disable running of the app at the end of the print job.
runviewer=1< BR>
; Uncomment this line to open the image with IE or whatever app you want. The
; path to the image file is sent to the application you specify.
;application=c:\program files\Imaging Professional\kodakimg.exe

For versions of the Exit32.dll that write single-page files, such as the bitmap and JPEG dlls, the "path" tag indicates the name of the folder containing the files rather than the file name.

 

Special Considerations for Windows Vista

Windows Vista implements a "User Account Control" (UAC) feature that prevents a process from launching a process in a different desktop than the first process. When Exit32.dll launches the default application, or the application specified in nedprint.ini, Vista displays a dialog box prompting the user to allow the launched application to execute. If the user replies affirmatively, the application launches in the Vista-controlled desktop. For most users this will not be a problem. It does require that the user acknowledge the Vista dialog, however. This problem could be alleviated by using a standard interprocess mechanism, such as a TCPIP/Socket connection, to communicate between the Exit32.dll and a serving "process launcher" that runs in the logged-in users session. That process could then launch the viewing application to display the document.

Vista places extra security on the Windows folder, so permissions on the nedprint.ini need to be specifically set to allow updating if you intend to use the "Written" tag to monitor print completion.

Earlier versions of Exit32.dll wrote to the Windows folder by default (when not overridden by the path tag in nedprint.ini). Without creating a specifically permissioned folder in Windows, writes to the folder would fail. The new versions of Exit32.dll write to the user's document folder, which normally has adequate permission for file creation.


Printer Definition (GPD) file

All printer characteristics and page sizes are defined in the nedip.gpd file. You can add new paper sizes or change the attributes of existing page sizes by modifying this file. This file is a text file so you can edit it with any text editor. Refer to the Microsoft DDK documentation for GPD files, which is located in the Help documentation for the DDK. You should always test with a copy of the original GPD file, since it is easy to make a mistake in this file and cause partial or complete failure of the driver. The nedip.gpd file resides in the Windows/system32/spool/w32x86/3 folder. You can modify this file and test the changes without rebooting the machine.

 

 

Northeast Data Corp
Charlotte, NC 
nedatacorp@carolina.rr.com