Description

Adds a new font to the document and returns its value.

Syntax

Public Function AddFont( _
   ByVal FontName As String _
) As Long

Parameters

FontName
The file path of the font file.

Return Type

Long

Example

[ASP - VBScript] 

<% 
    Dim MyDocument 
    Set MyDocument = Server.CreateObject( "DynamicPDF.Document" ) 
    Dim MyFont 
    MyFont = MyDocument.AddFont( "C:\Windows\Fonts\arial.ttf" ) 
    Dim MyPage 
    Set MyPage = MyDocument.AddPage() 
    Dim MyLabel 
    Set MyLabel = MyPage.AddLabel( "The new font", 40, 40, 120, 40 ) 
    MyLabel.Font = MyFont  
    MyDocument.DrawToWeb 
    Set MyPage = Nothing 
    Set MyDocument = Nothing 
%> 
 

See Also

Document Object