Change the Font Style

These functions allow you to change text styles within your report. The LinePrinter class gets information about the printer functions from the printer configuration file. If the printer configuration file does not contain information on how to perform a font style command, the command is ignored without generating an error. This allows you to make calls regardless of what printer you are connected to.

If the method is called after the report has been cancelled, the method returns -1.  If the printer configuration file does not contain instructions for the chosen printer for this method, 0 is returned. If the command was successfully sent to the printer, a positive value is returned.

On error a LinePrinterException is thrown.

You can create these kinds of text styles with the LinePrinter methods:

Boldface

Compressed print

Double wide print

Italics

Strikeout text

Underlined text

You can also return a text style to the normal font for the printer or reset all font settings. Resetting a font turns off BoldOff, ItalicOff, UnderlineOff, and StrikeOutOff print for all text written after this method is called.

More Information

Next » Generate a Report: Create Header and Footer Text and Control Orphans

Back « Generate a Report: Write Text to the Printer and Position the Printer Head