Table of Contents

Class Markup

Namespace
PDFjet.NET
Assembly
PDFjet.dll

Makes paragraphs of text with the inline markup of Markdown: bold, italic, bold italic, code and links, in the fonts given for each, and as GitHub's Markdown has them, bold and italic, strikethrough of two ~, one being text here, as in ~5, and links that are their address, <https://pdfjet.com> or https://pdfjet.com alone. An _ emphasizes only at the edge of a word, so that snake_case is text; an address alone ends before the punctuation at its end, as the period of a sentence, and before a ) that closes no ( of its own. A backslash before a punctuation character, as in *, makes it plain text, and so is a mark that has no match, such as the * of 2 * 3. Emphasis can be inside a link, and neither inside code. A word keeps its punctuation next to it in another style, as in bold, with no space between them: the paragraph joins its text lines with Paragraph.AddJoined.

Headings, lists, block quotes and the rest of Markdown's blocks are not read: a line break is a space, and Paragraphs splits a text into paragraphs at its empty lines. The markup is read in time linear in the length of the text, so it can come from anyone. Please see Example_18.

public class Markup
Inheritance
Markup
Inherited Members

Constructors

Markup(Font, Font, Font, Font, Font)

Creates the markup of paragraphs in the fonts, each at its size.

public Markup(Font regular, Font bold, Font italic, Font boldItalic, Font code)

Parameters

regular Font

the font of the text.

bold Font

the font of bold text.

italic Font

the font of italic text.

boldItalic Font

the font of bold italic text.

code Font

the font of code, usually a monospaced font.

Methods

Paragraph(string)

Returns the text as one paragraph: a text line for each run of text in one style, each joined to the text before it.

public Paragraph Paragraph(string text)

Parameters

text string

the text with its markup.

Returns

Paragraph

the paragraph.

Paragraphs(string)

Returns the paragraphs of the text, which empty lines separate.

public List<Paragraph> Paragraphs(string text)

Parameters

text string

the text with its markup.

Returns

List<Paragraph>

the paragraphs, none for a text with no words.

SetLinkColor(int)

Sets the color of the text of links. The default is Color.blue. Color.transparent leaves it unchanged.

public Markup SetLinkColor(int color)

Parameters

color int

the color as a 0xRRGGBB value.

Returns

Markup

this Markup.

SetLinkUnderline(bool)

Sets whether the text of links is underlined, as it is by default.

public Markup SetLinkUnderline(bool underline)

Parameters

underline bool

true to underline the links.

Returns

Markup

this Markup.