public void Process() { textObject.SaveState(); try { textObject.GetData(); string fill_clr = textObject.FillColor.IsNamedColor ? textObject.FillColor.Name : "#" + textObject.FillColor.Name; string txt_clr = textObject.TextColor.IsNamedColor ? textObject.TextColor.Name : "#" + textObject.TextColor.Name; xmlItem.SetProp("x", textObject.Text); xmlItem.SetProp("Fill.Color", fill_clr); xmlItem.SetProp("TextFill.Color", txt_clr); xmlItem.SetProp("Font.Name", textObject.Font.Name); } finally { textObject.RestoreState(); } }