Description

Adds a Code128 bar code object to the TransformationGroup object and returns a New Code128 object.

Syntax

Public Function AddCode128( _
   ByVal CodeValue As String, _
   ByVal X As Single, _
   ByVal Y As Single, _
   ByVal Height As Single, _
   Optional ByVal Font As DPDF_Font = 7, _
   Optional ByVal FontSize As Single = -1 _
) As Code128

Parameters

CodeValue
The value stored in the bar code.
X
The X Coordinate of the Code128 bar code.
Y
The Y Coordinate of the Code128 bar code.
Height
Height of the Code128 bar code.
Font
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)
or the new added font using AddFont method or AddType1Font method.
FontSize
Optional. The font size of the Code128 text. Default is -1. The DefaultFontSize of the Document object is taken if font size is not specified.

Return Type

A Code128 object.

Example

[ASP - VBScript] 

<% 
    ' Create a PDF Document 
    Dim MyDocument  
    Set MyDocument = Server.CreateObject( "DynamicPDF.Document" )  
    ' Create a Page and add it to the document 
    Dim MyPage  
    Set MyPage = MyDocument.AddPage() 
    Dim MyTransGroup 
    Set MyTransGroup = MyPage.AddTransformationGroup( 30, 30, 400, 300 ) 
    ' Create a bar code 
    Dim MyBarcode 
    Set MyBarcode = MyTransGroup.AddCode128( "Code 128 Bar Code.", 50, 50, 48 ) 
    ' Draw the PDF 
    MyDocument.DrawToWeb 
    Set MyPage = Nothing 
    Set MyDocument = Nothing 
%> 

See Also

TransformationGroup Object