The Command line
Command-line parameter were widely used in the DOS days, when programs were called by typing their file name, which may be followed by additional parameters. In the present time parameters are commonly used in .bat files and by computer programmers, but many Window users also use them.
Bersoft HTML Print is designed to work with and be called by other software or at least, by a batch file, passing the filename (HTML or text file) to be printed as a parameter in the command line.
Examples:
htmlprint.exe file:///D:/printingfiles/myfile.html
htmlprint.exe "file:///D:/printingfiles/ascii File.txt"
Notice that when a file name or path has any spaces, it should be enclosed in double quotes.
htmlprint.exe http://bersoft.com/index.htm
Notice that when a file name or
path has any spaces, it should be enclosed in double quotes.
Always provide the full path for all file names.
When
passing the file to be printed as the first command line parameter it
should be preceded by the correct prefix:
|
file:/// |
For files located on the local hard disk or network. |
|
http:// |
For files located online |
|
|
When passing as first parameter a File Printing List, or passing a configuration file as second parameter, it should have no prefix at all, and should be located in the local hard disk or network. |
HTMLPrint runs as a visible application only when it is
started without passing any argument in the command-line
or when printing a file lists, if configured to run visibly.
Although HTMLPrint looks for a configuration file named HTMLPRINT.INI, situated in its same directory, it is possible to use other configuration file, passing the filename as the second command-line argument.
Example:
htmlprint.exe
"file:///D:/printing files/myfile.html"
"d:/printing files/conf1.ini"
Passing alternative configuration
files in the command line is useful to configure HTMLPrint in different
ways for different printing needs..
Additional Command Line Switch
The following optional switch always should be added at the end of the command line, after the filename to be printed and the configuration file (if an was specified).
|
/P |
Set the printer to be used. |
Example:
htmlprint.exe "file:///D:/temp files/doc1.htm"
/P="HP LaserJet 4000"
A Command Line Switch always takes precedence over the configuration file settings.