Description:
Plex users may wish to use another printing tool to force a direct printing of a report produced as a Rich Text Format (RTF) file.
This is similar to the /p option used by older versions of MS Wordviewer. However, as of Wordviewer 2007, this option is no longer supported.
In the case of a program like PRINT.EXE, in order to define a special printer (not the default printer), it is necessary to specify the name of the printer as a second parameter (i.e. PRINT.EXE "printer name").
This should mean that the [Report] section of the application ini file should be written as follows:
[Report]
Print=PRINT.EXE "printer name"
Unfortunately this does not work because Plex appends the RTF file name at the end of this string, and the final command has the wrong format for PRINT.EXE.
We need a general purpose method for specifying custom parameter formats to be supplied when triggering print programs from Plex-generated applications.
Solution:
*Batch file:[email protected] [email protected] The RTF file is passed in from the Plex WinC [email protected] "%1"=="" goto :[email protected] NOT "%1"=="" set RTF_FILE=%[email protected] Set the name of the program used to print the RTF file [email protected] PRINT_CMD=x:\...\Microsoft Office\OFFICE11\[email protected] Add any other parameters that the above program uses here. For example, the printer [email protected] [email protected] Format the call parameters as expected by the print [email protected]"%PRINT_CMD%" "%RTF_FILE%" %PRINTER%@:end