Search
DiagramView.PrintPreviewEx Method (PrintDocument)
See Also
 





Displays an extended print-preview window.

Namespace: MindFusion.Diagramming.WinForms
Assembly: MindFusion.Diagramming.WinForms

 Syntax

C#  Copy Code

public void PrintPreviewEx (
    PrintDocument doc
)

Visual Basic  Copy Code

Public Sub PrintPreviewEx( _
    doc As PrintDocument _
)

 Parameters

doc
An instance of the .NET PrintDocument class.

 Remarks

Opens an extended Print Preview window for the current diagram. Compared to the standard .NET preview dialog, the extended one provides better-looking icons and additional buttons such as "page orientation" and "scale to page". PreviewOptions allows assigning custom images to the preview toolbar buttons and localizing the menu item and tooltip texts.

The preview output is rendered with the same settings that are used for printing, assigned by the PrintOptions structure. That ensures uniform output of the printed document both on paper and in the preview mode. Print job settings include document title and several flags that control whether images, shadows, headers, and so on, are printed.

You can attach print-event handlers to doc and do custom printing in addition to the MindFusion.Diagramming standard output.

It is possible to create your own preview form and specify it as an argument to the third overload of PrintPreviewEx. Your preview form class must implement the IPrintPreview interface defined in MindFusion.Diagramming.WinForms.dll. IPrintPreview contains a single property called Document of type System.Drawing.Printing.PrintDocument. The method sets this property to the diagram document and calls the ShowDialog method of your form.

 See Also