Posted by a ceTe Software moderator
Hello,
Yes, you can add text in small caps style using our DynamicPDF Generator for .NET product. You will need to use a TTF, OTF font which has support for small caps style. You will need to build OpenTypeFont class object using the font file path and set this font object to the page elements. You can refer documentation on OpenTypeFont class
here. Below is the sample code for it.
Document document = new Document();
Page page = new Page();
document.Pages.Add(page);
//Build font object using the font file path which has support for the small cap text.
OpenTypeFont fontObj = new OpenTypeFont(@"path of the TTF or OTF font file");
TextArea area = new TextArea("This is to test ", 100, 100, 200, 400);
area.Font = fontObj;
page.Elements.Add(area);
document.Draw(@"C:\MyDocumet.pdf");
Thanks,
ceTe Software Support Team.