Dear Patrick,
Thanks for considering Aspose.Slides.
To add symbols, you must know their (hex or decimal) codes and their fonts. You can find them out by creating such symbols in some presentation using MS-PowerPoint and then inspecting their values in debugger with the help of Aspose.Slides.
Below is the sample code that inserts 4 such symbols, it is fully commented for your help and I have also attached its output.
//Create an empty presentation
Presentation
pres = new Presentation();
//Get the empty slide
Slide
sld = pres.GetSlideByPosition(1);
//Add a rectangle shape and textframe
Table
tbl = sld.Shapes.AddTable(100, 100, 4000,2000,3,3);
//Get the textframe
TextFrame
tf = tbl.GetCell(1, 1).TextFrame;
//Add Font and note its index
//You will have to add symbol charset wingdings font
FontEntity
rawSymbolFontEnt = new FontEntity(pres, pres.Fonts[0]);
rawSymbolFontEnt.CharSet =
FontCharSet.SYMBOL_CHARSET;
rawSymbolFontEnt.FontName =
"Wingdings";
int
rawSymbolFontIndex = pres.Fonts.Add(rawSymbolFontEnt);
//Add symbol characters from their hex codes
StringBuilder
sb = new StringBuilder();
sb.Append((
char)0xf0e0);
sb.Append((
char)0xf0df);
sb.Append((
char)0xf0e8);
sb.Append((
char)0xf0e7);
//Write the text in the portion
Portion
port=tf.Paragraphs[0].Portions[0];
port.Text = sb.ToString();
//Set the RawSymbolFontIndex property
port.RawSymbolFontIndex = rawSymbolFontIndex;
//Write presentation on disk
pres.Write(
"c:\\outSymbols.ppt");
Many Thanks and Kind Regards,
Shakeel Faiz
Support Engineer
Aspose Tyumen Team