Interface nsIWebBrowserPrintType

nsIWebBrowserPrint corresponds to the main interface for printing an embedded Gecko web browser window/document

Hierarchy

Properties

doingPrint: boolean

Returns whether it is in Print mode

doingPrintPreview: boolean

Returns whether it is in Print Preview mode

printPreviewCurrentPageNumber: number

This returns the number of the page which is currently in the Print Preview viewport

XXXdholbert Consider renaming this? (similar to printPreviewNumPages above) Strictly speaking, this is the number of the sheet which is currently in the print preview viewport. Fix in bug 1669762.

printPreviewNumPages: number

This returns the total number of pages for the Print Preview

XXXdholbert Consider renaming this? Strictly speaking, this is the number of sheets (which is the same as the number of pages in the default configuration of one page per sheet). Fix in bug 1669762.

rawNumPages: number

This represents the "raw" total number of pages, where "raw" means that this value is not amended to account for reductions from pages-per-sheet or page ranges (unlike other APIs on this interface).

So e.g. for a 20-page document, this attribute will be 20, regardless of whether the user has chosen a smaller page range, and regardless of whether the user is using pages-per-sheet to reduce the number of sheets.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • This exists PrintPreview mode and returns browser window to galley mode

    Returns

    void

    Returns void

  • Print the specified DOM window

    Returns

    void

    Note

    To cancel, close the window of the document that is being printed.

    Parameters

    • aThePrintSettings: nsIPrintSettings

      Printer Settings for the print job, if aThePrintSettings is null then the global PS will be used.

    • aRemotePrintJob: RemotePrintJobChildPtr
    • aWPListener: nsIWebProgressListener

      is updated during the print

    Returns void

  • Print Preview the specified DOM window

    Returns

    void

    Note

    To cancel, close the print preview document's window.

    Parameters

    • aThePrintSettings: nsIPrintSettings

      Printer Settings for the print preview, if aThePrintSettings is null then the global PS will be used.

    • aWPListener: nsIWebProgressListener

      is updated during the printpreview

    • aCallback: PrintPreviewResolver

    Returns void

  • Returns

    void

    Parameters

    • aNavType: number

      navigation enum

    • aPageNum: number

      page num to navigate to when aNavType = ePrintPreviewGoToPageNum

    Returns void

Generated using TypeDoc