Window's Printer
Mapping to a PxPLUS Device Driver
A new feature has been added in PxPLUS v6.10,
where a Windows Printer may be defined on a PC so that it appears in the Windows
Printer Selection Dialogue, and if that printer is selected from within a
PxPLUS session, then PxPLUS attempts to re-route the printer to a device
driver.
This allows Developers to create Windows
Printer's on workstations for items such as the Preview, PDF, or
HTML output from PxPLUS .
This feature works based on the name and
properties of the printer.
The printer must have an output port of "NUL:"
The second word in the Printer's Name, will be parsed out and an underscore
will be added to the beginning and end of the name. The PxPLUS LIB directory
will be scanned for a device driver that matches this name. If the device driver
is not found, then the printer will not be mapped anywhere, and will simply
output to NUL.
EXAMPLE:
Printer Name: "PxPLUS Viewer"
A search of the PxPLUS Lib Directory for "_viewer_" will be made.
EXAMPLE:
Printer Name: "PxPLUS PDF"
A search of the PxPLUS Lib Directory for "_pdf_" will be made.
Follow the next steps to add such a Printer to a Windows XP Workstation:
- Go to Window's Printer's and Faxes.
- Select "Add a printer".
- Select "Local printer".
- Check the "Use the following port" for an entry of "NUL:".
if "NUL:" exists, select it and go to Step 8.
- Select "Create a New Port".
- Set the "Type of Port" = "Local Port".
- For "Port Name" enter "NUL:" (without the quotes).
- From the manufacturer / printers dialogue, select "Generic" for a
manufacturer and "Generic/Text Only" for the printer.
- Select "Keep existing driver"
- Enter a name for your printer, keep in mind, that the 2nd word in the
name is what must match the device driver.
For this "Printer Name", enter "PxPLUS Viewer"
- For the "Set as default printer", select "No".
- For "Sharing", select "No".
- For "Print a test page ?", select "No".
- Check your settings and Select "Finish".
You should now have a printer named "PxPLUS Viewer" as one of this
workstation's printers.
From within any PxPLUS application, you will see this printer in the
*WINPRT* printer selection dialogue. Whenever this printer is selected, PxPLUS
will re-route the printer to the specific device driver.
In the case of our example, we have created a printer named "PxPLUS Viewer"
which is connected to "NUL:". If selected from Printer Selection,
PxPLUS will
automatically close "*WINPRT*" and open the file "*VIEWER*" instead.
NOTE: This will ONLY work in PxPLUS applications!
If the user selects one of these special PxPLUS mapped printers from another
application (Word, Notepad, etc.), they will get NO output.
|