Working with Print

Printing a Diagram

Aspose.Diagram for Java provides four overloads methods for printing of the diagrams. These methods are flexible enough to print the diagram to the default printer or to any of the available printer with customized settings. You only need to select the appropriate print method according to the requirement.

Printing to specific printer

Printing of the diagram to the specific printer requires the name of the printer as parameter to the Print method of the Diagram. Perform the following steps in order to print the diagram to the desired printer:

  • Create an instance of Diagram class to load a diagram that is to be printed
  • Call the Print method of the Diagram class with printer name as string parameter to the Print method

Printing to Specific Printer Programming Sample

Setting Printer and Document Name

Aspose.Diagram APIs allows to set the specific printer and document name for a print job. Perform the following steps in order to print the diagram to the desired printer:

  • Create an instance of Diagram class to load a diagram that is to be printed
  • Call the Print method of the Diagram class with printer and document name as string parameter to the Print method

Setting Printer and Document Name Programming Sample