protected override Paragraph NovoParagrafo(string texto, LoadOpitionsDocGemBox loadOpitionsDocGemBox) { Paragraph paragraph = new Paragraph(WordDocument); this.FormatParagraph(paragraph); paragraph.Content.LoadText(texto, LoadOptions.HtmlDefault); //Run runAnterior = null; return(paragraph); }
protected virtual Paragraph NovoParagrafo(string texto, LoadOpitionsDocGemBox loadOpitionsDocGemBox) { Section sec = ObterSection(); Paragraph paragraph = new Paragraph(document); this.FormatParagraph(paragraph); switch (loadOpitionsDocGemBox) { case LoadOpitionsDocGemBox.DocxDefaut: break; case LoadOpitionsDocGemBox.Html: //verificar primeira pag paragraph.Content.LoadText(texto, LoadOptions.HtmlDefault); sec.Blocks.Add(paragraph); //this.document.Content.End.LoadText("\n"); //this.document.Content.End.LoadText(texto, LoadOptions.HtmlDefault); break; case LoadOpitionsDocGemBox.Txt: break; case LoadOpitionsDocGemBox.None: break; default: break; } //Paragraph paragraph = new Paragraph(doc, textoHtml); //this.doc.Content.End.InsertRange(new SpecialCharacter(this.doc, SpecialCharacterType.LineBreak).Content); //this.doc.Content.End.InsertRange(new Paragraph(doc, new SpecialCharacter(doc, SpecialCharacterType.LineBreak)).Content); //this.doc.Content.End.LoadText(paragraph.Content.ToString(), LoadOptions.HtmlDefault); return(paragraph); }