See Also

Document Object

!UNRECOGNISED ELEMENT TYPE 'defaultmemberrequirements'!
Name
The name given to the font family.
Regular
Regular font.
Bold
Bold font.
Italic
Italic font.
BoldItalic
Bold Italic font.

Description

Adds a new font family to the document and returns its value. Check FormattedTextArea for fontfamily use.

Syntax

Public Function AddFontFamily( _
   ByVal Name As String, _
   ByVal Regular As DPDF_Font, _
   ByVal Bold As DPDF_Font, _
   ByVal Italic As DPDF_Font, _
   ByVal BoldItalic As DPDF_Font _
) As Long

Parameters

Name
The name given to the font family.
Regular
ValueDescription
DPDF_Font_UseDefaultThe Document's default font is used. (Value = 1)
DPDF_Font_CourierCourier Font (Value = 3)
DPDF_Font_CourierBoldCourier-Bold Font (Value = 4)
DPDF_Font_CourierObliqueCourier-Oblique Font (Value = 5)
DPDF_Font_CourierBoldObliqueCourier-BoldOblique Font (Value = 6)
DPDF_Font_HelveticaHelvetica Font (Value = 7)
DPDF_Font_HelveticaBoldHelvetica-Bold Font (Value = 8)
DPDF_Font_HelveticaObliqueHelvetica-Oblique Font (Value = 9)
DPDF_Font_HelveticaBoldObliqueHelvetica-BoldOblique Font (Value = 10)
DPDF_Font_TimesRomanTimes-Roman Font (Value = 11)
DPDF_Font_TimesBoldTimes-Bold Font (Value = 12)
DPDF_Font_TimesItalicTimes-Italic Font (Value = 13)
DPDF_Font_TimesBoldItalicTimes-BoldItalic Font (Value = 14)
DPDF_Font_SymbolSymbol Font (Value = 15)
DPDF_Font_ZapfDingbatsZapfDingbats Font (Value = 16)
DPDF_Font_HeiseiKakuGothicW5Heisei Kaku Gothic W5 Japanese font (Value = 17)
DPDF_Font_HeiseiMinchoW3Heisei Mincho W3 Japanese font (Value = 18)
DPDF_Font_HanyangSystemsGothicMediumHanyang Systems Gothic Medium Korean font (Value = 19)
DPDF_Font_HanyangSystemsShinMyeongJoMediumHanyang Systems Shin MyeongJo Medium Korean font (Value = 20)
DPDF_Font_SinoTypeSongLightSinoType Song Light Chinese (simplified) font (Value = 21)
DPDF_Font_MonotypeHeiMediumMonotype Hei Medium Chinese (traditional) font (Value = 22)
DPDF_Font_MonotypeSungLightMonotype Sung Light Chinese (traditional) font (Value = 23)
Regular font.
Bold
ValueDescription
DPDF_Font_UseDefaultThe Document's default font is used. (Value = 1)
DPDF_Font_CourierCourier Font (Value = 3)
DPDF_Font_CourierBoldCourier-Bold Font (Value = 4)
DPDF_Font_CourierObliqueCourier-Oblique Font (Value = 5)
DPDF_Font_CourierBoldObliqueCourier-BoldOblique Font (Value = 6)
DPDF_Font_HelveticaHelvetica Font (Value = 7)
DPDF_Font_HelveticaBoldHelvetica-Bold Font (Value = 8)
DPDF_Font_HelveticaObliqueHelvetica-Oblique Font (Value = 9)
DPDF_Font_HelveticaBoldObliqueHelvetica-BoldOblique Font (Value = 10)
DPDF_Font_TimesRomanTimes-Roman Font (Value = 11)
DPDF_Font_TimesBoldTimes-Bold Font (Value = 12)
DPDF_Font_TimesItalicTimes-Italic Font (Value = 13)
DPDF_Font_TimesBoldItalicTimes-BoldItalic Font (Value = 14)
DPDF_Font_SymbolSymbol Font (Value = 15)
DPDF_Font_ZapfDingbatsZapfDingbats Font (Value = 16)
DPDF_Font_HeiseiKakuGothicW5Heisei Kaku Gothic W5 Japanese font (Value = 17)
DPDF_Font_HeiseiMinchoW3Heisei Mincho W3 Japanese font (Value = 18)
DPDF_Font_HanyangSystemsGothicMediumHanyang Systems Gothic Medium Korean font (Value = 19)
DPDF_Font_HanyangSystemsShinMyeongJoMediumHanyang Systems Shin MyeongJo Medium Korean font (Value = 20)
DPDF_Font_SinoTypeSongLightSinoType Song Light Chinese (simplified) font (Value = 21)
DPDF_Font_MonotypeHeiMediumMonotype Hei Medium Chinese (traditional) font (Value = 22)
DPDF_Font_MonotypeSungLightMonotype Sung Light Chinese (traditional) font (Value = 23)
Bold font.
Italic
ValueDescription
DPDF_Font_UseDefaultThe Document's default font is used. (Value = 1)
DPDF_Font_CourierCourier Font (Value = 3)
DPDF_Font_CourierBoldCourier-Bold Font (Value = 4)
DPDF_Font_CourierObliqueCourier-Oblique Font (Value = 5)
DPDF_Font_CourierBoldObliqueCourier-BoldOblique Font (Value = 6)
DPDF_Font_HelveticaHelvetica Font (Value = 7)
DPDF_Font_HelveticaBoldHelvetica-Bold Font (Value = 8)
DPDF_Font_HelveticaObliqueHelvetica-Oblique Font (Value = 9)
DPDF_Font_HelveticaBoldObliqueHelvetica-BoldOblique Font (Value = 10)
DPDF_Font_TimesRomanTimes-Roman Font (Value = 11)
DPDF_Font_TimesBoldTimes-Bold Font (Value = 12)
DPDF_Font_TimesItalicTimes-Italic Font (Value = 13)
DPDF_Font_TimesBoldItalicTimes-BoldItalic Font (Value = 14)
DPDF_Font_SymbolSymbol Font (Value = 15)
DPDF_Font_ZapfDingbatsZapfDingbats Font (Value = 16)
DPDF_Font_HeiseiKakuGothicW5Heisei Kaku Gothic W5 Japanese font (Value = 17)
DPDF_Font_HeiseiMinchoW3Heisei Mincho W3 Japanese font (Value = 18)
DPDF_Font_HanyangSystemsGothicMediumHanyang Systems Gothic Medium Korean font (Value = 19)
DPDF_Font_HanyangSystemsShinMyeongJoMediumHanyang Systems Shin MyeongJo Medium Korean font (Value = 20)
DPDF_Font_SinoTypeSongLightSinoType Song Light Chinese (simplified) font (Value = 21)
DPDF_Font_MonotypeHeiMediumMonotype Hei Medium Chinese (traditional) font (Value = 22)
DPDF_Font_MonotypeSungLightMonotype Sung Light Chinese (traditional) font (Value = 23)
Italic font.
BoldItalic
ValueDescription
DPDF_Font_UseDefaultThe Document's default font is used. (Value = 1)
DPDF_Font_CourierCourier Font (Value = 3)
DPDF_Font_CourierBoldCourier-Bold Font (Value = 4)
DPDF_Font_CourierObliqueCourier-Oblique Font (Value = 5)
DPDF_Font_CourierBoldObliqueCourier-BoldOblique Font (Value = 6)
DPDF_Font_HelveticaHelvetica Font (Value = 7)
DPDF_Font_HelveticaBoldHelvetica-Bold Font (Value = 8)
DPDF_Font_HelveticaObliqueHelvetica-Oblique Font (Value = 9)
DPDF_Font_HelveticaBoldObliqueHelvetica-BoldOblique Font (Value = 10)
DPDF_Font_TimesRomanTimes-Roman Font (Value = 11)
DPDF_Font_TimesBoldTimes-Bold Font (Value = 12)
DPDF_Font_TimesItalicTimes-Italic Font (Value = 13)
DPDF_Font_TimesBoldItalicTimes-BoldItalic Font (Value = 14)
DPDF_Font_SymbolSymbol Font (Value = 15)
DPDF_Font_ZapfDingbatsZapfDingbats Font (Value = 16)
DPDF_Font_HeiseiKakuGothicW5Heisei Kaku Gothic W5 Japanese font (Value = 17)
DPDF_Font_HeiseiMinchoW3Heisei Mincho W3 Japanese font (Value = 18)
DPDF_Font_HanyangSystemsGothicMediumHanyang Systems Gothic Medium Korean font (Value = 19)
DPDF_Font_HanyangSystemsShinMyeongJoMediumHanyang Systems Shin MyeongJo Medium Korean font (Value = 20)
DPDF_Font_SinoTypeSongLightSinoType Song Light Chinese (simplified) font (Value = 21)
DPDF_Font_MonotypeHeiMediumMonotype Hei Medium Chinese (traditional) font (Value = 22)
DPDF_Font_MonotypeSungLightMonotype Sung Light Chinese (traditional) font (Value = 23)
Bold Italic font.

Return Type

Long

Example

        
       

[ASP - VBScript] 

<% 
    Dim MyDocument 
    Set MyDocument = Server.CreateObject( "DynamicPDF.Document" ) 
    Dim MyFontOne 
    Dim MyFontTwo 
    Dim MyFontThree 
    Dim MyFontFour 
    MyFontOne = MyDocument.AddFont( "C:\Windows\Fonts\arial.ttf" ) 
    MyFontTwo = MyDocument.AddFont( "C:\Windows\Fonts\arialbd.ttf" ) 
    MyFontThree = MyDocument.AddFont( "C:\Windows\Fonts\ariali.ttf" ) 
    MyFontFour = MyDocument.AddFont( "C:\Windows\Fonts\arialbi.ttf" ) 
    MyFontFamily = MyDocument.AddFontFamily( "Arial", MyFontOne, MyFontTwo, MyFontThree, MyFontFour ) 
    Set MyPage = MyDocument.AddPage() 
    Dim MyFormattedText  
    MyFormattedText = "<p>Formatted text area provide rich formatting support for " + _ 
               "text that appears in the document. You have complete control over 8 paragraph " + _ 
               "properties: spacing before, spacing after, first line indentation, left indentation," + _ 
               " right indentation, alignment, allowing orphan lines, and white space preservation; " + _ 
               "6 font properties: <font face='Times'>font face, </font><font " + _ 
               "pointSize='6'>font size, </font><font color='FF0000'>color, " + _ 
               "</font><b>bold, </b><i<italic and </i><u>" + _ 
               "underline</u>; and 2 line properties: leading, and leading type. Text can " + _ 
               "also be rotated.</p>" 
    Dim MyFormattedTextArea  
    Set MyFormattedTextArea = MyPage.AddFormattedTextArea( MyFormattedText, 100, 140, 200, 140, MyFontFamily, 12, True ) 
    MyDocument.DrawToWeb 
    Set MyPage = Nothing 
    Set MyDocument = Nothing 
%> 
 

See Also

Document Object

 

 


© Copyright 2007, ceTe Software