/// <summary> /// Renders a MigraDoc document with help of the internal RtfWriter. /// </summary> private void WriteDocument() { RtfFlattenVisitor flattener = new RtfFlattenVisitor(); flattener.Visit(this.document); Prepare(); this.rtfWriter.StartContent(); RenderHeader(); RenderDocumentArea(); this.rtfWriter.EndContent(); }
/// <summary> /// Renders a MigraDoc document with help of the internal RtfWriter. /// </summary> private void WriteDocument() { if (Document.EmbeddedFiles.Count > 0) { throw new InvalidOperationException("Embedded files are not supported in RTF documents."); } RtfFlattenVisitor flattener = new RtfFlattenVisitor(); flattener.Visit(_document); Prepare(); _rtfWriter.StartContent(); RenderHeader(); RenderDocumentArea(); _rtfWriter.EndContent(); }