Migradoc Add horizontal line

How to add a simple horizontal line in Migradoc to separate the content above the line from the content below the line?

Paragraph 1

Point 2


Point 3

Ect

+7
c # migradoc
source share
2 answers

You can add a border to a paragraph or table.

For your sample, you can add a lower border to paragraph 2 or add an upper border to paragraph 3 or add a new paragraph between them and set an upper or lower border.

+8
source share

from this repo

var hr = doc.AddStyle("HorizontalRule", "Normal"); var hrBorder = new Border(); hrBorder.Width = "1pt"; hrBorder.Color = Colors.DarkGray; hr.ParagraphFormat.Borders.Bottom = hrBorder; hr.ParagraphFormat.LineSpacing = 0; hr.ParagraphFormat.SpaceBefore = 15; 
+2
source share

All Articles