public string ToRtf() { var context = new RtfContext(); context.AddFont(DefaultFont.Name); var sb = new StringBuilder(); foreach (var textBlock in textBlocks) { sb.Append($@"{{\pard {textBlock.ToRtf(context)}\par}}"); } return(context.RtfHeader + sb.ToString() + "}"); }
public abstract string ToRtf(RtfContext context);