sHtml | (String) Specifies HTML page (or source of text, image, etc.).
It is possible to enter variously (according to setting of sourcetype): - URL address, see Example1.
- Text content, see Example4. |
---|---|
sOptions | (String) Additional parameters Entries are in the KeyVal format, for example "sourcetype:url;printer:select;".
"sourcetype:xxx;" (mandatory) - Specifies 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. It means that in this case it is not a HTML text, but ordinary unformated text (for example in the *.txt file).
url - In sHtml, there is the URL address. It is passed to InternetExplorer unchanged. It should contain also the prefix (http://, file:// ...) "printer:xxx;" (optional) - Specifies the printer for printing.
select (default) - Print with the option of selecting the printer and changing the settings (orientation, resolution, etc.) using the input window.
default - Printing with the Windows OS default printer (no input window). The default printer settings cannot be modified (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. |
Pm.PrintHtmlPage("https://www.promotic.eu", "sourcetype:url;printer:select;");
Pm.PrintHtmlPage("#app:Log.txt", "sourcetype:file;printer:default;");
Pm.PrintHtmlPage("#appres:Image.png", "sourcetype:file;printer:default;");
Dim sString
sString = Pm.FileTextRead("#data:file.txt", 0)
Pm.PrintHtmlPage sString, "sourcetype:file;printer:default;"
Dim oReport
Set oReport = pMe.Pm("/Reports/Report1")
Pm.PrintHtmlPage oReport.SaveToString(""), "sourcetype:htmlstring;printer:preview;"
var sHtml = oTView.SaveToHtm("ver:1", "return:", "mode:graph;");
Pm.PrintHtmlPage(sHtml, "sourcetype:htmlstring;printer:preview;width:700px;height:930px;");