Image Viewer CP ActiveX Control

PDFAddFont

 

Adds a TrueType font to the PDF file. Before you draw the text, you must Add font to the PDF file.

Public Function PDFAddFont( _
   ByVal strFontName As String, _
   ByVal bBold As Bool, _
   ByVal bItalic As Bool
) As long

 

Parameter

strFontName
   the name of font.

bBold
   the value indicating whether this Font is bold. True is bold.

bItalic
   the value indicating whether this Font is italic. True is italic.

Return Value

Return the font ID.

Example

   

Visual Basic Syntax
ImageViewer1.PDFInitAnnotation
FontID = ImageViewer1.PDFAddFont("Arial", True, True)
ImageViewer1.PDFSetTextColor 255, 0, 255
ImageViewer1.PDFDrawText 0, 0, 10000, "This is sample text 1 ", FontID, 40, 0