I am using the Novacode DocX c# library to create word documents and have run into a problem. I want my paragraphs to 'keep together' at page breaks. But, I also want to use soft returns to force my pictures to display vertically between lines of text.
So my question is, how do I add soft returns within paragraphs?
You can try to add one of those unicode char at the end of your paragraph, for instance :
using (DocX document = DocX.Create(@"docs\myDoc.docx"))
{
Paragraph p = document.Paragraphs[0];
p.Append("\u000D");
p.Append("\u000A");
}
Tell me if it solves your problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With