Printing and Exporting

  • 2 minutes to read

Printing

End-users can print the diagram by selecting the Print ribbon's application menu item in the Diagram Designer. It invokes the standard Print dialog that allows an end-user to print the diagram, as well as select the printer (if required), specify the range of pages to print, the number of copies, etc. To invoke the dialog in code, use the DiagramControl.Print method.

The Print Preview application menu item invokes the Print Preview that allows end-users to see exactly how a diagram will look when it is printed. The corresponding method is DiagramControl.ShowPrintPreview.

The Quick Print application menu item immediately sends the diagram to the default printer. The corresponding method is DiagramControl.QuickPrint.

Exporting

Diagrams can be exported to one of the following formats: GIF, PNG, BMP, JPG, PDF.

To export diagrams to a file or stream in code, use the DiagramControl.ExportDiagram method.

The DiagramControl provides built-in PDF export functionality. The DiagramControl.ExportToPdf method exports the diagram to a single-page PDF file. The DiagramControl.PrintToPdf method exports the diagram to a multi-page PDF document.

End-users can export diagrams to a file by selecting the Export As ribbon's application menu item in the Diagram Designer. It invokes the Export As dialog window where end-users can select the desired file format and specify the path and name of the file to which to export the diagram.

TIP

Use the DiagramOptionsExport.PrintExportMode property to specify whether to preserve the diagram content placement relative to the document boundaries when printing or exporting the diagram.