PRIM_PDF - setFont Method

Sets text font face, variant for upcoming text elements

Member of PRIM_PDF (PRIM_PDF)

Parameters

NameTypeData TypeDescription
Font*InputUnicode StringFont name or family
Style*Input (Optional)EnumerationFont style or variant

Details

Sets the text font and variant (style) for upcoming text elements.
 
Currently the following fonts are supported:
  1. Courier
  2. Helvetica
  3. Noto Sans
  4. Noto Sans CJK jp (Normal and Bold only)
  5. Roboto
  6. Times
  7. Verdana

Example

Set the font and style
Define_Com Class(#PRIM_PDF) Name(#pdf) Unitm(mm) Pageformat(A4) Pageorientation(Portrait)
 
#pdf.start
 
#pdf.setFont Font('Verdana') Style(Italic)
#pdf.text Text('Hello world!') Left(10) Top(10)
 
#pdf.save Filename('myReport.pdf')
 

Style Allowed Values

Enum ValueDescription
NormalNormal font style
BoldBold font style
ItalicItalisized font style
BoldItalicBold and italisized font style


 
 

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020