iTextSharp.text.rtf.text.RtfParagraph.WriteContent C# (CSharp) Method

WriteContent() public method

public WriteContent ( Stream result ) : void
result Stream
return void
        public override void WriteContent(Stream result) {
            result.Write(PARAGRAPH_DEFAULTS, 0, PARAGRAPH_DEFAULTS.Length);
            result.Write(PLAIN, 0, PLAIN.Length);
            if (inTable) {
                result.Write(IN_TABLE, 0, IN_TABLE.Length);
            }
            if(this.paragraphStyle != null) {
                this.paragraphStyle.WriteBegin(result);
            }
            result.Write(PLAIN, 0, PLAIN.Length);
            for (int i = 0; i < chunks.Count; i++) {
                IRtfBasicElement rbe = (IRtfBasicElement)chunks[i];
                rbe.WriteContent(result);
            }
            if(this.paragraphStyle != null) {
                this.paragraphStyle.WriteEnd(result);
            }
            if (!inTable) {
                result.Write(PARAGRAPH, 0, PARAGRAPH.Length);
            }
            this.document.OutputDebugLinebreak(result);
        }

Usage Example

 /// <summary>
 /// Write this RtfSection and its contents
 /// </summary>
 public override void WriteContent(Stream result)
 {
     result.Write(RtfParagraph.Paragraph, 0, RtfParagraph.Paragraph.Length);
     if (Title != null)
     {
         Title.WriteContent(result);
     }
     foreach (IRtfBasicElement rbe in Items)
     {
         rbe.WriteContent(result);
     }
 }