Call the Print method to print the current diagram. PrintPreview displays the standard .NET print-preview window. PrintPreviewEx displays an extended preview form that provides buttons for choosing page orientation and for scaling the print output.
The PrintOptions class exposes the available settings for printing and print preview. The visualization properties in that class are used both for printing and for preview. That allows achieving uniform output on the printed pages and on the display. An instance of this structure is accessible via the diagram's PrintOptions property.
The preview window displayed by PrintPreviewEx can have its UI elements customized via the PreviewOptions class. Members of that class allow assigning images to the preview toolbar buttons and changing the tooltip and menu texts to allow localization of the user interface. The appearance settings for the diagram displayed in the preview window are still set through PrintOptions.
If BackgroundImage is set and EnableBackgroundImage is enabled, the size of a printed diagram is defined solely by the Bounds property. If the actual diagram items occupy only a small portion of the document, there might be some pages printed that do not display any items but just a part of the background image. To avoid that, call ResizeToFitItems before printing.
If no background image is used, MindFusion.Diagramming prints only the part of a document containing all items that are both Visible and Printable. That avoids printing blank pages.
The Scale property allows printing a diagram in larger or smaller proportions than the actual ones. ScaleToPage automatically calculates Scale so that the whole diagram fits in a single printed page.
You can print diagrams without showing them in a DiagramView by means of the DiagramPrinter and DiagramDocumentPrinter classes. The former lets you print a diagram assigned to the Diagram property, while the latter prints a DiagramDocument assigned to its Document property.