ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Rich Text Area control
  • Example 1: Printing a text in a specific font
  • Example 2: Printing a text while using several preset fonts
iCreateFont (Example)
Example 1: Printing a text in a specific font
WINDEVWEBDEV - Server codeLinuxJavaUser code (UMC)Ajax The following example shows how to print a text in a specific font.
// Create a 48-point Pica font
iCreateFont(1, 48, iBold+iItalic, iRoman)
// Print a text with this font
iPrint(iFont(1) + "48-pica text")
// Ends the print
iEndPrinting()
Example 2: Printing a text while using several preset fonts
WINDEVWEBDEV - Server codeLinuxUser code (UMC)Ajax The following example shows how to print a text using 3 different fonts.
// Create several fonts
iCreateFont(1, 12, iNormal, "Times New Roman")
iCreateFont(2, 24, iNormal+iBold, iCourier)
iCreateFont(3, 36, iItalic+iBold, iCourier)
// Prints a text with several fonts
iPrint(iXPos(10) + iFont(1) + "Text at 10 mm from the border" + ...
iXPos(70) + iFont(2) + "Text at 70 mm from the border" + ...
iXPos(150) + iFont(3) + "Text at 150 mm from the border")
// Ends the print
iEndPrinting()
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help