ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Print functions
  • Calculating the height of a text written with fonts of different sizes
  • Calculating the height of a text containing CR characters
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Calculates the height of the font for the text to print (in millimeters).
Example
x is int = iTextHeight(iFont(2) + CL.NOMCLI)
iPrintWord("La hauteur du nom du client est égale à : ")
iPrint(x)
iEndPrinting()
Syntax
<Result> = iTextHeight([<Font identifier> + ] <Text to print>)
<Result>: Real
  • Height of specified text (in millimeters) if the print is performed,
  • -1 if the print job was canceled before the function was executed.
<Font identifier>: Optional character string
Identifier of the font used, returned by iFont. If this parameter is not specified, the last font used will be selected.
<Text to print>: Character string
Character string whose height you want to get.
Warning: a height is returned even if the text to be printed is an empty string.
Remarks

Calculating the height of a text written with fonts of different sizes

You must call iTextHeight for each text that uses a different font.

Calculating the height of a text containing CR characters

iTextHeight ignores the CR characters found in the text. You must count the number of CR characters in order to add as many times the text height to get the total height.
Component: wd300prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help