NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

PrintDocument Methods

The methods of the PrintDocument class are listed below. For a complete list of PrintDocument class members, see the PrintDocument Members topic.

Public:

Dispose (inherited from Component) Disposes of the Component.
Equals (inherited from Object) Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality).
GetContainer (inherited from Component) Returns the IContainer that contains the Component.
GetDesignMode (inherited from Component) Gets a value indicating whether the Component is currently in design mode.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetServiceObject (inherited from Component) Returns an object representing a service provided by the Component.
GetType (inherited from Object) Gets the Type of the Object.
Print Prints the document.
ToString (inherited from Component) Returns a String containing the name of the Component, if any. This method should not be overridden. For internal use only.

Protected:

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
OnBeginPrint Raises the System.Drawing.Printing.PrintDocument.BeginPrint event.
OnEndPrint Raises the System.Drawing.Printing.PrintDocument.EndPrint event.
OnPrintPage Raises the System.Drawing.Printing.PrintDocument.PrintPage event.
OnQueryPageSettings Raises the System.Drawing.Printing.PrintDocument.QueryPageSettings event.

Event Hookup:

AddOnBeginPrint Adds an event handler for the OnBeginPrint event.
AddOnEndPrint Adds an event handler for the OnEndPrint event.
AddOnPrintPage Adds an event handler for the PrintPage event. The PrintPage event occurs when it's time to print a page.
AddOnQueryPageSettings Adds an event handler for the OnQueryPageSettings event. The OnQueryPageSettings event occurs immediately before each page is printed; if you wish to change page settings in the middle of a print job, do it here.
RemoveOnBeginPrint Removes an event handler that has been associated with the OnBeginPrint event.
RemoveOnEndPrint Removes the given handler for the "OnEndPrint" event. If there are duplicate entries, ALL are removed.
RemoveOnPrintPage Removes the given handler for the "OnPrintPage" event. If there are duplicate entries, ALL are removed.
RemoveOnQueryPageSettings Removes the given handler for the "OnQueryPageSettings" event. If there are duplicate entries, ALL are removed.

See Also

PrintDocument Class | System.Drawing.Printing Namespace