Applies to
Description
The FontName property gets or sets the font name in the PDF document.
Datatype
String
Usage
You can set the FontName property for the font of a text block in a PDF document following the example:
PDFdocument lpdf_doc PDFpage lpdf_page PDFrichtext lpdf_rtext PDFfont lpdf_font String ls_text lpdf_doc = create PDFdocument lpdf_page = create PDFpage lpdf_rtext = create PDFrichtext lpdf_font = create PDFfont lpdf_rtext.width = lpdf_page.getwidth( ) ls_text = "Addtextblock text" lpdf_font.fontname = "simsunb" lpdf_font.fontsize = 32 lpdf_rtext.addtextblock(ls_text,lpdf_font) lpdf_page.addcontent( lpdf_rtext) lpdf_doc.addpage( lpdf_page) lpdf_doc.save( "D:\save\richtext_addtextblock.pdf")