Closed geraluca closed 1 year ago
I believe what you want is:
wordTable.AllowTextWrap = true;
For paragraphs with Images
var pargraphWithImage = paragraph.AddImage(file, 100, 100, WrapTextImage.InLineWithText, "Przemek and Kulek on an image");
I am not aware of any other TextWrapping methods applicable to paragraphs, but I could be wrong.
I think I explained myself badly, if in a text to be placed in a paragraph, I have to go to the next line, without joining two paragraphs but remaining in the same one, how do you do it? Thank you
var paragraph = document.AddParagraph("Basic paragraph - Page 4");
paragraph.ParagraphAlignment = JustificationValues.Center;
paragraph.Color = SixLabors.ImageSharp.Color.Blue;
paragraph.AddText("Test2");
paragraph.AddBreak(BreakValues.TextWrapping);
paragraph.AddText(" This is continuation").SetUnderline(UnderlineValues.Double).SetFontSize(15).SetColor(Color.Yellow).SetHighlight(HighlightColorValues.DarkGreen);
var paragraph1 = document.AddParagraph("Basic paragraph - Page 1").AddText(" Ok ").AddBreak(BreakValues.TextWrapping).AddText("More text");
Keep in mind that WordParagraph is actually a "Run" in Office OpenXML. It's not 1:1 to Paragraph.
I have a problem with text strings, if in the text of a paragraph or in a table I want to wrap a part of my text (in vb.net Vbcrlf), how should I do it? Thank you