*WINPRT* Redirection to Fax/Viewer/… |
|
The WINPRT interface within PxPlus allows a logical Windows printer to be defined on a PC that will automatically redirect output to another logical PxPlus "*xxxx*" file. This capability allows developers to create Windows printers on workstations that will actually route the printed output to the logical files such as the *VIEWER*, *PDF* or *HTML* without having to code a custom printer selection routine.
This feature uses the name and properties of the printer selected in order to determine if the output should be redirected and if the printer selected by the user satisfies the following criteria:
|
• |
The printer must have an output port of "NUL:". |
|
• |
The second word in the printer's logical file will be parsed out, and an _ (underscore) will be added to the beginning and end of this value. The PxPlus Lib directory will be scanned for a file that matches this name. |
The following are some sample printer names and how they would be mapped:
|
Printer Name: |
"PxPlus Viewer" |
|
Maps to: |
*Viewer* |
|
Printer Name: |
"Georges PDF" |
|
Maps to: |
*PDF* |
|
Printer Name: |
"Acctg html" |
|
Maps to: |
*HTML* |
|
Printer Name: |
"Mikes plusfax" |
|
Maps to: |
*PLUSFAX* |
To add a redirected logical printer to a Windows workstation, perform the following steps:
Step |
Description |
1. |
Go to Window's Printers and Faxes. |
2. |
Select "Add a printer". |
3. |
Select "Local printer". |
4. |
Check the "Use the following port" for an entry of "NUL:". Generally, this will not exist the first time you add a logical printer; however, if it does exist, select it and proceed to Step 8. |
5. |
Select "Create a New Port". |
6. |
Set the "Type of Port" = "Local Port". |
7. |
For "Port Name", enter "NUL:" (without the quotes and make sure to remember the trailing colon). |
8. |
When prompted for the device driver from the manufacturer/printers dialogue, select "Generic" for a manufacturer and "Generic/Text Only" for the printer. |
9. |
Select "Keep existing driver". |
10. |
Enter the logical name you want to use for your printer. Keep in mind that the second word in the name is what must match the device driver. |
11. |
Select "No" for the "Set as default printer". |
12. |
Select "No" for printer "Sharing". |
13. |
Select "No" for "Print a test page ?". |
14. |
Check your settings and select "Finish". |
You should now have a printer named "PxPlus Viewer" as one of this workstation's printers.