guides:programming:programmers_reference_manual:calctext_set_printer_message

CALCTEXT Set_Printer Message

The CALCTEXT message is used to calculate the width and height of a text string. The current font information, line spacing, and page size is used to calculate the height and width of the text. Use the Get_Printer CALCTEXT message to retrieve the width and height of the text after setting the text with the CALCTEXT message.

ParameterDescription of FieldsCommentsDefault
Parm1 - Text<1> TextText to calculate width and height""
*  The following example shows how to use the CALCTEXT message.
declare function Set_Printer
stat = Set_Printer("INIT") ;* Start printing
stat = Set_Printer("CALCTEXT", "This is a test. ")
size = Get_Printer("CALCTEXT") ;* get the size
textWidth = size<1> ;* width of the text
textHeight = size<2> ;* height of the text
stat = Set_Printer("TERM") ;* End printing
  • guides/programming/programmers_reference_manual/calctext_set_printer_message.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1