Special File Handling
*WINPRT* - Redirection to Fax/Viewer/..  
   
  The WINPRT interface within ProvideX allows a logical Windows Printer to be defined on a PC that will automatically redirect output to another logical ProvideX "*xxxx*" file. This capability allows Developers to create Windows Printer's 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. 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 will be parsed out and an underscore will be added to the beginning and end of this value. The ProvideX LIB directory will be scanned for a file that matches this name. For example if the printer name was "Joes viewer" the system would look for the file _viewer_ in the system LIB directory.


*Note* If the output port is set to NUL: but If no corresponding file is found, the printer will not be mapped anywhere, and any data output will simply route to NUL:.


Examples The following are some sample printer names and how they would be mapped:

Printer Name: "ProvideX 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*
   
Configuration To add a redirected logical printer to a Windows Workstation, perform the following steps (Based on Windows XP):

Step Action
1 Go to Window's Printer's 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, but 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 you 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 2nd word in the name is what must match the device driver. For example if you enter "ProvideX Viewer" as the logical name, output to this printer by ProvideX will route to *viewer*.
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 "ProvideX Viewer" as one of this workstation's printers.



*Note* While these printers will allow for the automatic redirection of output from within ProvideX applications, any attempt to output to these printers from non-ProvideX application will result in no output being generated.