PrintHtmlPage - method of object Pm

Print or display the preview of the HTML page or text.
PrintHtmlPage(sHtml As String, sOptions As String)
Pm.PrintHtmlPage sHtml, sOption
sHtml(String) Name and path to the file or the source content of the HTML page (according to the sourcetype).
sOptions(String) Additional parameters Entries are in format PmNamedValues, for example "sourcetype:url;printer:select;".
"sourcetype:xxx;" (mandatory) - Defines the meaning of the sHtml parameter
htmlstring - In sHtml, there is the content of the HTML page.
textstring - In sHtml, there is the content of the TXT page. I.e. in this case it is not a HTML text, but ordinary unformated text (for example in *.txt file).
file - In sHtml, there is the path to a file on the disc. See PROMOTIC path to files and folders.
url - In sHtml, there is the URL address. It is passed to Internet Explorerwith no modification. It should contain also the prefix (http://, file:// ..)
"printer:xxx;" (optional) - Defining the printer.
select (default) - Printing with the option of selecting the printer and changing the setting (orientation, resolution, etc.) by using the input window.
default - Printing with the OS Windows default printer (no input window). The default printer settings cannot be modified (orientation, resolution, etc.).
preview - Displaying the print preview with the option of changing the setting (orientation, resolution, etc.).
"width:xxx;" (optional) - The width of the source page before printing. The width and height are usually optional because the content adapts to the printed page.
"height:xxx;" (optional) - The height of the source page before printing.
The method can also be called in the graphic item events for Web Panels. I.e. it is possible to print also in Web client, with following limitations:
- sourcetype:file; is not functional
- printer:default; is not functional (the query for printer is always carried out, the same way as for printer:select; setting)
Printing the content of an url adress with the option to choose and configure the printer.
Pm.PrintHtmlPage "", "sourcetype:url;printer:select;"
Printing a text file.
Pm.PrintHtmlPage "#app:Log.txt", "sourcetype:file;printer:default;"
Printing image file.
Pm.PrintHtmlPage "#appres:Image.png", "sourcetype:file;printer:default;"
Printing the content of text variable
Dim sString
sString = Pm.FileTextRead("#data:file.txt", 0)
Pm.PrintHtmlPage sString, "sourcetype:textstring;printer:default;"
Preview before printing the PmReport object
Dim oReport
Set oReport = pMe.Pm("/Reports/Report1)
Pm.PrintHtmlPage oReport.SaveToString(""), "sourcetype:htmlstring;printer:preview;"
Printing from the variable filled with the ActiveX TrendsView print page on the default OS Windows printer with the option to set the dimensions of the page.
Dim sHtml
oTView.SaveToHtm "", sHtml, "mode:graph;"
Pm.PrintHtmlPage sHtml, "sourcetype:htmlstring;printer:default;width:2100;height:2970;"
- Pm
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- PrintHtmlPage
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice