drawTextSize
drawTextSize(str: String; textHeight: Integer output): Integer;
The drawTextSize method of the Printer class returns the size of the text, using the current values of the drawFont properties. An exception is raised if this method is invoked from a server method.
The text alignment and the text rotation properties (that is, drawTextAlign, drawTextCharRotation, and drawTextRotation) are not used in determining this size.
The parameters for the drawTextSize method are listed in the following table.
Parameter | Description |
---|---|
str | Text string that is to be measured |
textHeight | Text height returned |
The drawTextSize method returns the text width, which can be used in the drawTextAt method.
For details about placing output directly on a printer page at any location without the use of frames and drawing rotated text and characters, see "Free-Format Printing", later in this chapter.