AODL.ExternalExporter.PDF.Document.ContentConverter.SimpleTextConverter.Convert C# (CSharp) Метод

Convert() публичный статический Метод

Converts the specified simple text.
public static Convert ( AODL simpleText, iTextSharp font ) : iTextSharp.text.Chunk
simpleText AODL The simple text.
font iTextSharp
Результат iTextSharp.text.Chunk
		public static iTextSharp.text.Chunk Convert(AODL.Document.Content.Text.SimpleText simpleText, iTextSharp.text.Font font)
		{
			try
			{
				return new iTextSharp.text.Chunk(simpleText.Text, font);
			}
			catch(Exception)
			{
				throw;
			}
		}

Usage Example

Пример #1
0
 /// <summary>
 /// Gets the text contents.
 /// </summary>
 /// <param name="textCollection">The text collection.</param>
 /// <returns>The content. ArrayList of chunks and phrases.</returns>
 public static ICollection GetTextContents(ITextCollection textCollection, iTextSharp.text.Font font)
 {
     try
     {
         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);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
All Usage Examples Of AODL.ExternalExporter.PDF.Document.ContentConverter.SimpleTextConverter::Convert