Special Characters in Label Text

Special Characters in Label Text

Forum member · Jan 9, 2016
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

Re: Special Characters in Label Text

Support · Jan 11, 2016
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.

Re: Special Characters in Label Text

Forum member · Jan 11, 2016
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.