Forums

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Generator for COM/ActiveX (v8.x)  /  Special Characters in Label Text

Forum Thread - Special Characters in Label Text

 Jan 09 2016 1:44 PM
Hi, I want to place a copyright symbol (circle with a C in it) in label text.  I can paste the symbol into the label text and it does produce the symbol, but it also prints another character with it. I will try to paste the results here: Copyright© 2016

So, is there a way to get the copyright symbol in label text?

Dim SetLFLabel
Set SetLFLabel = MyTemplate.AddLabel("Copyright© 2016",0,30,518,18)
SetLFLabel.Font = DPDF_Font_Helvetica
SetLFLabel.FontSize = 9
SetLFLabel.Align = DPDF_Align_Left

Thanks.
--Jim
 Jan 11 2016 8:52 AM
Posted by a ceTe Software moderator
Hello Jim,

You can add the copyright symbol to the PDF using correct Unicode value. Also you will need to make sure to use a font which has support for the symbol which you are adding. Below is the VB6 code sample for adding copyright symbol.

    Dim objDoc As DynamicPDF.Document
    Set objDoc = New DynamicPDF.Document
    Dim objPage As DynamicPDF.Page
    Set objPage = objDoc.AddPage()
    Dim MyOpenTypeFont
    MyOpenTypeFont = objDoc.AddFont("ARIALUNI.ttf")
    
    Dim MyText
    MyText = "Copyright" & ChrW("169") & "2016"
    Dim SetLFLabel
    Set SetLFLabel = objPage.AddLabel(MyText, 0, 30, 518, 18)
    SetLFLabel.Font = MyOpenTypeFont
    SetLFLabel.FontSize = 9
    SetLFLabel.Align = DPDF_Align_Left

    'Add a page to the document
    Set objPage = objDoc.AddPage()
    objDoc.DrawToFile ("C:\HelloWorld.pdf")
    'Object cleanup
    Set objDoc = Nothing

Thanks,
ceTe Software Support Team.
 Jan 11 2016 4:05 PM
Thanks.  However, it appears that the out-of-the-box font "DPDF_FontFamily_Helvetica" includes circle-c so I don't need to open special unicode font; ChrW("169") works great.  Thanks again.

All times are US Eastern Standard time. The time now is 7:22 AM.