I am trying to add text to a page using a custom font. The text seems to get added but it gets displayed as a bunch of boxes. Below is the code that I am using.
Dim documentM As MergeDocument = New MergeDocument
Dim myPage As Page
Dim Label1 As ceTe.DynamicPDF.PageElements.Label
Dim cusFont As OpenTypeFont
'add new font
cusFont = New OpenTypeFont("WINGDNG2.TTF")
pdfDocumentA = New PdfDocument("c:\faxes\1502_Expresso_doc1.PDF")
countA = pdfDocumentA.Pages.Count
documentM.Append(pdfDocumentA, 1, countA)
'Add Custom Font to page
myPage = documentM.Pages(0)
Label1 = New ceTe.DynamicPDF.PageElements.Label("20123-123123", 210, myPage.Dimensions.Height - 30, 512, 14, cusFont, 12)
Label1.Font = cusFont
myPage.Elements.Add(Label1)
documentM.Draw("PDFForView.pdf")
System.Diagnostics.Process.Start("PDFForView.pdf")
Custom Font
Re: Custom Font
Forum member · Feb 5, 2010I got it figured out. I am still not able to get the Windings2 example to work, but I am able to get the custom font I want to use to work.
So I'm good. Thanks!
Re: Custom Font
Support · Feb 8, 2010Hello,
You can add customer fonts using the OpenTypeFont class. You can refer to the help documentation about Fonts
. Please make sure that the text you are adding is supported by the font file you are using in order to see the text properly.
Thanks,
ceTe Software Support Team.