Performance Considerations | Fonts And Text

TrueType fonts can be used by creating a AddFont method , specifying the path to the TrueType font file in the constructor. You can then use that font anywhere a font is specified, such as AddLabel and AddTextArea methods of Page or Container Page Elements like AreaGroup.

[ASP - VBScript]
<!-- METADATA TYPE="typelib" UUID="{DF9225FE-94A4-490D-8CAD-E8366CE621D3}" -->
<%
    ' Create a TrueType font class.
    Dim MyDocument
    Set MyDocument = Server.CreateObject( "DynamicPDF.Document" )
    Dim MyTrueTypeFont
    Dim MyPage
    Set MyPage = MyDocument.AddPage()
    MyTrueTypeFont = MyDocument.AddFont( "C:\Windows\Fonts\verdana.ttf" )
    ' Use the TrueType font in a text area Page Element.
    MyPage.AddTextArea "Text", 0, 0, 200, 12, , MyTrueTypeFont, 12 
    MyDocument.DrawToWeb
    Set MyPage = Nothing
    Set MyDocument = Nothing
%>
Only the character of a TrueType font that are used are embedded in the PDF document. This greatly reduces the size of the resulting PDF.

NOTE: Helvetica is equivalent to the Arial TrueType font included on Windows systems, and Times is equivalent to the Times New Roman TrueType font included on Windows systems. It is much more efficient to use the equivalent core fonts whenever possible.

 

See Also 

Performance Considerations | Fonts And Text