Printer Object
 
The operation of the Printer object in Tradium Basic Script works in a different way from the standard printer object used in Visual Basic (for Applications). The Printer object in Tradium Basic Script is much more comprehensive and supports various output options, such as on-screen print preview and export to a PDF file.
 
The Printer object processes texts with automatic recognition of RTF (Rich Text Formatted) codes. Although rendering (digital formatting) of the document takes a bit longer if you insert RTF codes in texts, it creates very nice, professional-quality documents. At the end of this chapter you will find an overview of RTF codes.
 
With the Printer object in Tradium Basic Script you can format both simple and more complex documents. Before a document can be generated, the object has to be initialised. This is followed by the various formatting and printing instructions. When the document is ready, you execute a command to send the document to the printer.
printer. The example below shows the minimum instructions required for a document.
 
Below is an example of how to apply the Printer object:
 
Voorbeeld   
 
Sub Main
 
   'Activate Printer object:
   If Not Printer.Init() Then End
 
   'sending text to the printer
   Printer.Paragraph "Hello World"
 
   'printing is ready, close object
   Printer.Submit
 
End Sub