public static ICollection GetTextContents(ITextCollection textCollection, iTextSharp.text.Font font)
{
ArrayList contents = new ArrayList();
foreach(object obj in textCollection)
{
if (obj is AODL.Document.Content.Text.FormatedText)
{
contents.Add(FormatedTextConverter.Convert(
obj as AODL.Document.Content.Text.FormatedText));
}
else if (obj is AODL.Document.Content.Text.SimpleText)
{
contents.Add(SimpleTextConverter.Convert(
obj as AODL.Document.Content.Text.SimpleText, font));
}
else if (obj is AODL.Document.Content.Text.TextControl.TabStop)
{
contents.Add(SimpleTextConverter.ConvertTabs(
obj as AODL.Document.Content.Text.TextControl.TabStop, font));
}
else if (obj is AODL.Document.Content.Text.TextControl.WhiteSpace)
{
contents.Add(SimpleTextConverter.ConvertWhiteSpaces(
obj as AODL.Document.Content.Text.TextControl.WhiteSpace, font));
}
}
return contents;
}
}