Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migradoc Add horizontal line

Tags:

c#

migradoc

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

Paragraph 1

Paragraph 2


Paragraph 3

ETC

like image 749
rikket Avatar asked Aug 26 '13 08:08

rikket


People also ask

How do I convert a migradoc paragraph to Markdown?

Since the MigraDoc DOM is pretty basic, much of the conversion involves setting the Style of generated MigraDoc Paragraph instances. You can then configure these styles however you like. See the example project for more details. Import the MigraDoc.Extensions.Markdown namespace and call AddMarkdown on a MigraDoc Section instance:

How do I handle an HTML element in migradoc?

The key is the HTML element you wish to handle and the value is a Func<HtmlNode, DocumentObject, DocumentObject. The DocumentObject instance passed to the handler is the parent object in the MigraDoc DOM, usually a Section or Paragraph (you may need to cater for both). The return value should be the DocumentObject that was created.

How do I convert migradoc to HTML or PDF?

MigraDoc.Extensions makes use of MarkdownSharp to convert from Markdown to HTML and the Html Agility Pack to convert from HTML to PDF. Since the MigraDoc DOM is pretty basic, much of the conversion involves setting the Style of generated MigraDoc Paragraph instances.


1 Answers

You can add a border to a paragraph or a table.

With respect to your sample, you could add a bottom border to paragraph 2 or add a top border to paragraph 3 or add a new paragraph between them and set either top or bottom border.

like image 92
I liked the old Stack Overflow Avatar answered Sep 20 '22 09:09

I liked the old Stack Overflow