Posted by a ceTe Software moderator
Hello Scott,
Thanks for sending all the information. You can set the alternative text for the Rectangle (Circle and Line) using the StructureElement class of DynamicPDF API. Below is the code sample.
Document doc = null;
doc = new Document();
Page pg = new Page(PageSize.Letter, PageOrientation.Portrait, 0);
doc.Creator = "Oregon Department of Education";
doc.Author = "Oregon Department of Education";
doc.Title = "My Title";
doc.CompressionLevel = 9;
doc.Tag = new TagOptions();
doc.ViewerPreferences.DisplayDocTitle = true;
doc.Language = "ES";
TransparencyGroup tgBase = null;
tgBase = new TransparencyGroup(1.0F, BlendMode.Normal);
//Setting alternative text to the Rectangle using StructureElement
Rectangle rectObj = new Rectangle(50, 50, 576, 28, new ceTe.DynamicPDF.WebColor("#ecf5e1"), new ceTe.DynamicPDF.WebColor("#ecf5e1"), 0, LineStyle.None);
StructureElement structElement = new StructureElement(TagType.Figure);
structElement.AlternateText = "MyRectangle";
rectObj.Tag = structElement;
tgBase.Add(rectObj);
pg.Elements.Add(tgBase);
doc.Pages.Add(pg);
doc.Draw(@"E:\Temp\V7StructureElement.pdf");
Thanks,
ceTe Software Support Team.