Printing BarTender Documents |
A BarTender document can be printed by calling either the Format.Print method or the Format.PrintOut method. The Format.Print method prints a job to a printer's spooler and returns a BtPrintResult enumeration value. It can either return immediately after it spools the print job or wait to return until the print job is complete.
The Format.PrintOut method runs a print job and gives you the option to display a print job status dialog and/or the print dialog.
The following sample code prints a BarTender document without displaying either the print job status dialog or the print dialog.
While the print job is running, one or more messages might be generated that indicate print success or error. These messages can be viewed by enumerating the Messages collection that is returned as a parameter from the Format.Print method. Each Message object in the collection contains a Message.Message property that gives a description of the message. Additional properties of the message can also be examined, such as the severity and type.
The following sample code displays any error or warning messages that BarTender encounters while it prints a document:
Before you run the print job, you can configure exactly how your document is printed by using the following properties of the Format object before you call the Format.PrintOut method or the Format.Print method.
Related Topics