mobileFX WebKitX ActiveX
WebKitX JavaScript Externs~-_namespace / ClosePrinter Method
In This Topic
    ClosePrinter Method
    In This Topic
    ClosePrinter, releases a printer handle opened by OpenPrinter.
    Syntax
    var value; // Type: any
    value = ClosePrinter();
    function ClosePrinter() : any;
    Remarks

    Releases a printer handle opened by OpenPrinter.

    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 data 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