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 spooling the print job or wait to return until printing is complete.
The Format.PrintOut method will simply execute a print job, giving you the option to display a print job status dialog and/or the print dialog.
The following example prints a BarTender document without displaying either the print job status dialog or the print dialog.
While printing, one or more messages may be generated indicating print success or error. These messages can be viewed by enumerating the Messages collection returned as a parameter from the Format.Print method. Each Message object in the collection contains a Message.Message property giving a description of the message. Additional properties of the message can also be examined, such as the severity and type.
The following example displays any error or warning messages that BarTender encounters while printing a document:
Before printing, you can configure exactly how your document will print by using the following properties of the Format object prior to calling the Format.PrintOut method or the Format.Print method.
Related Topics