Below are the codes:
Document fullDocument = new Document();
DocumentBuilder builder = new DocumentBuilder(fullDocument);
ParagraphFormat paragraphFormat = builder.ParagraphFormat;
paragraphFormat.LineSpacingRule = LineSpacingRule.Multiple;
paragraphFormat.LineSpacing = 18.0;
var firstParagraph = builder.InsertParagraph();
var nameTitleRun = new Run(fullDocument, "Name of Journal: ");
nameTitleRun.Font.Bold = true;
nameTitleRun.Font.Name = defaultFontName;
firstParagraph.AppendChild(nameTitleRun);
But in the word file, there’s an extra paragraph break before the first paragraph, so my question is how to remove it? Thanks.
20200720220835.png (1.8 KB)