AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de impresión
  • Special cases
  • Calculating the width of a text written with fonts of different sizes
  • Calculating the width of a text containing CR characters
  • Miscellaneous
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Calculates the width (in millimeters) of the text to print, according to the specified font.
Ejemplo
x is int = iTextWidth(iFont(5) + CU.CUSTNAME)
iPrintWord("The width of customer name is equal to: ")
iPrint(x)
iEndPrinting()
Sintaxis
<Result> = iTextWidth([<Font identifier> + ] <Text to print>)
<Result>: Real
  • Width (in millimeters) of the specified text if the print job was 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 width you want to get.
Observaciones
WINDEVReportes y ConsultasAndroidWidget Android JavaCódigo de Usuario (UMC)

Special cases

Depending on the destination (printer, file, ...), the width returned by iTextWidth may differ (by a tenth of a millimeter) for the same text, displayed in the same font. This difference is caused by the display mechanism used by Windows.

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

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

Calculating the width of a text containing CR characters

iTextWidth ignores the CR characters found in the text. You must call iTextWidth for each line found in the string.

Miscellaneous

A call to iParameter after iTextWidth will have no action because the print job is initialized.
Componente: wd300prn.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local