# PrintDocument Method The PrintDocument method prints a given text or file. Syntax
    [obj=] SiteKiosk.Printer.Printers.Item(1).
               PrintDocument(fontname, fontheight, textorfile,
               docname, datatype, fromfile)
Parameters
fontname | String that specifies the font to use.
fontheight | Long that specifies the height of the font
textorfile | String that specifies a text or filename to print.
docname | String that specifies the name of the document.
datatype | String that specifies the data type.
fromfile | Boolean that specifies whether textorfile is a file path.
Return Value Returns a Long value that specifies the job id. Remarks If textorfile specifies a file it must be the absolute path to a local text file (.txt). Examples The following example prints "Hello World!".
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    dPrinterName = "HP LaserJet 4100 Series PCL";
    dPrinter = SiteKiosk.Printer.FindPrinter(dPrinterName);
    dPrinter.PrintDocument("Arial", 80,"Hello world!","","",false);
    </SCRIPT>
Applies to SiteKiosk v7.2 (and later versions). Back to top