mobileFX WebKitX ActiveX
WebKitX JavaScript Externs~-_namespace / WritePrinter Method
Text to print or base-64 URL encoded image.
In This Topic
    WritePrinter Method
    In This Topic
    WritePrinter, notifies the print spooler that data should be written to the specified printer.
    Syntax
    var value; // Type: any
    
    // Parameters
    var Text; // Type:  string
    
    value = WritePrinter(Text);
    function WritePrinter( 
       Text : string
    ) : any;

    Parameters

    Text
    Text to print or base-64 URL encoded image.
    Remarks

     The WritePrinter function notifies the print spooler that data should be written to the specified printer. WritePrinter only supports GDI printing.

    The sequence for a print job is as follows: 

    1. To acquire a printer call OpenPrinter passing a name obtained from ShowSelectPrinterDialog.
    2. To begin a print job, call StartDocPrinter.
    3. To begin each page, call StartPagePrinter.
    4. To write text or image to a page, call WritePrinter.
    5. To end each page, call EndPagePrinter.
    6. Repeat 3, 4, and 5 for as many pages as necessary.
    7. To end the print job, call EndDocPrinter.
    8. To release the printer, call ClosePrinter.

    When a page in a spooled file exceeds approximately 350 MB, it may fail to print and not send an error message. For example, this can occur when printing large EMF or PDF files. The page size limit depends on many factors including the amount of virtual memory available, the amount of memory allocated by calling processes, and the amount of fragmentation in the process heap.

    All printer functions are blocking / synchronous function and might not return immediately. How quickly this function returns depends on run-time factors such as network status, print server configuration, and printer driver implementation factors that are difficult to predict when writing an application. Calling this function from a thread that manages interaction with the user interface could make the application appear to be unresponsive. Please anticipate this in your HTML5 applications.

    Browser Compatibility
    80