MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Revision 190810 of NPP_Print

  • Revision slug: NPP_Print
  • Revision title: NPP_Print
  • Revision id: 190810
  • Created:
  • Creator: Pmash
  • Is current revision? No
  • Comment markup
Tags: 

Revision Content

{{wiki.template('Np-plugin-api')}}

Summary

Requests a platform-specific print operation for an embedded or full-screen plug-in.

Syntax

#include <npapi.h>
 
void NPP_Print(NPP instance, NPPrint* PrintInfo);

Parameters

The function has the following parameters:

instance
Pointer to the current plug-in instance. Must be embedded or full-screen.
printInfo
Pointer to NPPrint structure.

Description

NPP_Print is called when the user requests printing for a web page that contains a visible plug-in (either embedded or full-page). It uses the print mode set in the NPPrint structure in its printInfo parameter to determine whether the plug-in should print as an embedded plug-in or as a full-page plug-in.

  • An embedded plug-in shares printing with the browser; the plug-in prints the part of the page it occupies, and the browser handles everything else, including displaying print dialog boxes, getting the printer device context, and any other tasks involved in printing, as well as printing the rest of the page. For an embedded plug-in, set the printInfo field to NPEmbedPrint.
  • A full-page plug-in handles all aspects of printing itself. For a full-page plug-in, set the printInfo field to NPFullPrint or null.

For information about printing on your platform, see your platform documentation.

MS Windows

On MS Windows printInfo->print.embedPrint.platformPrint is the device context (DC) handle. Be sure to cast this to type HDC.

The coordinates for the window rectangle are in TWIPS format. This means that you need to convert the x-y coordinates using the Windows API call DPtoLP when you output text.

See Also

NPPrint, NPFullPrint, NPEmbedPrint

Revision Source

<p>
</p><p>
{{wiki.template('Np-plugin-api')}}
</p>
<h3 name="Summary">Summary</h3>
<p>Requests a platform-specific print operation for an embedded or full-screen plug-in.
</p>
<h3 name="Syntax">Syntax</h3>
<pre>#include &lt;npapi.h&gt;
 
void NPP_Print(NPP instance, NPPrint* PrintInfo);
</pre> 
<h3 name="Parameters">Parameters</h3>
<p>The function has the following parameters:
</p>
<dl><dt>instance
</dt><dd> Pointer to the current plug-in instance. Must be embedded or full-screen.
</dd></dl>
<dl><dt>printInfo
</dt><dd> Pointer to <a href="en/NPPrint">NPPrint</a> structure.
</dd></dl>
<h3 name="Description">Description</h3>
<p><code>NPP_Print</code> is called when the user requests printing for a web page that contains a visible plug-in (either embedded or full-page). It uses the print mode set in the <a href="en/NPPrint">NPPrint</a> structure in its printInfo parameter to determine whether the plug-in should print as an embedded plug-in or as a full-page plug-in.
</p>
<ul><li> An embedded plug-in shares printing with the browser; the plug-in prints the part of the page it occupies, and the browser handles everything else, including displaying print dialog boxes, getting the printer device context, and any other tasks involved in printing, as well as printing the rest of the page. For an embedded plug-in, set the printInfo field to <a href="en/NPEmbedPrint">NPEmbedPrint</a>.
</li><li> A full-page plug-in handles all aspects of printing itself. For a full-page plug-in, set the printInfo field to <a href="en/NPFullPrint">NPFullPrint</a> or null. 
</li></ul>
<p>For information about printing on your platform, see your platform documentation.
</p>
<h4 name="MS_Windows">MS Windows</h4>
<p>On MS Windows <code>printInfo-&gt;print.embedPrint.platformPrint</code> is the device context (DC) handle. Be sure to cast this to type HDC.
</p><p>The coordinates for the window rectangle are in TWIPS format. This means that you need to convert the x-y coordinates using the Windows API call DPtoLP when you output text.
</p>
<h3 name="See_Also">See Also</h3>
<p><a href="en/NPPrint">NPPrint</a>, <a href="en/NPFullPrint">NPFullPrint</a>, <a href="en/NPEmbedPrint">NPEmbedPrint</a>
</p>
Revert to this revision