PrintDocument Method

The PrintDocument method prints a given text or file.


    [obj=] SiteKiosk.Printer.Printers.Item(1).
               PrintDocument(fontname, fontheight, textorfile,
               docname, datatype, fromfile)
    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.
    If textorfile specifies a file it must be the absolute path to a local text file (.txt).
    The following example prints "Hello World!".

    <SCRIPT TYPE="text/javascript">
    dPrinterName = "HP LaserJet 4100 Series PCL";
    dPrinter = SiteKiosk.Printer.FindPrinter(dPrinterName);
    dPrinter.PrintDocument("Arial", 80,"Hello world!","","",false);

Applies to
    SiteKiosk v7.2 (and later versions).

Back to top