Mozilla.com

  1. MDC
  2. Main Page
  3. NPFullPrint
Table of contents
  1. 1. Summary
  2. 2. Syntax
  3. 3. Fields
  4. 4. Description
  5. 5. See Also

NPFullPrint

Table of contents
  1. 1. Summary
  2. 2. Syntax
  3. 3. Fields
  4. 4. Description
  5. 5. See Also

« Gecko Plugin API Reference « Plug-in Side Plug-in API

Summary

Substructure of NPPrint that contains platform-specific information used during full-page mode printing.

Syntax

typedef struct _NPFullPrint
{
    NPBool pluginPrinted; /* true: print fullscreen */
    NPBool printOne;      /* true: print one copy */
                          /*       to default printer */
    void*  platformPrint; /* Platform-specific */
} NPFullPrint;

Fields

The data structure has the following fields:

pluginPrinted
Determines whether the plug-in prints in full-page mode. Values:
  • true: Plug-in takes complete control of the printing process and prints full-page.
  • false: (Default) Plug-in renders its area of the page only (for embedded plug-in).
printOne
Not currently in use. Should always be false.
  • true: Print single copy of page to the default printer.
  • false: Display print dialogs so user can choose printer, other options.
platformPrint
Platform-specific printing information.
  • Mac OS: THPrint
  • MS Windows: Printer's device context

Description

The NPP_Print function passes the plug-in a pointer to an NPPrint object (previously allocated by the browser). The NPFullPrint structure is used when the mode field of NPPrint is set to NP_Full.

The pluginPrinted field of this structure determines whether the plug-in prints in full-page mode or not. If you want the plug-in to take complete control of the printing process, it should print the full page and set the field pluginPrinted to true before returning.

If you want an embedded plug-in to simply render its area of the page, set pluginPrinted to false and return immediately; the browser calls NPP_Print again with the NPEmbedPrint substructure of NPPrint.

Page last modified 17:44, 25 Apr 2006 by Pmash

Tags:

Files (0)