Table of Contents

Class Markup

Namespace
iTextSharp.text.html
Assembly
iTextSharp.LGPLv2.Core.dll

A class that contains all the possible tagnames and their attributes.

public static class Markup
Inheritance
Markup
Inherited Members

Fields

CSS_KEY_BGCOLOR

iText specific

public const string CSS_KEY_BGCOLOR = "background-color"

Field Value

string

CSS_KEY_BORDERCOLOR

the CSS tag for the margin of an object

public const string CSS_KEY_BORDERCOLOR = "border-color"

Field Value

string

CSS_KEY_BORDERWIDTH

the CSS tag for the margin of an object

public const string CSS_KEY_BORDERWIDTH = "border-width"

Field Value

string

CSS_KEY_BORDERWIDTHBOTTOM

the CSS tag for the margin of an object

public const string CSS_KEY_BORDERWIDTHBOTTOM = "border-bottom-width"

Field Value

string

CSS_KEY_BORDERWIDTHLEFT

the CSS tag for the margin of an object

public const string CSS_KEY_BORDERWIDTHLEFT = "border-left-width"

Field Value

string

CSS_KEY_BORDERWIDTHRIGHT

the CSS tag for the margin of an object

public const string CSS_KEY_BORDERWIDTHRIGHT = "border-right-width"

Field Value

string

CSS_KEY_BORDERWIDTHTOP

the CSS tag for the margin of an object

public const string CSS_KEY_BORDERWIDTHTOP = "border-top-width"

Field Value

string

CSS_KEY_COLOR

CSS keys

public const string CSS_KEY_COLOR = "color"

Field Value

string

CSS_KEY_DISPLAY

CSS key that indicate the way something has to be displayed

public const string CSS_KEY_DISPLAY = "display"

Field Value

string

CSS_KEY_FONTFAMILY

the CSS tag for the font family

public const string CSS_KEY_FONTFAMILY = "font-family"

Field Value

string

CSS_KEY_FONTSIZE

the CSS tag for the font size

public const string CSS_KEY_FONTSIZE = "font-size"

Field Value

string

CSS_KEY_FONTSTYLE

the CSS tag for the font style

public const string CSS_KEY_FONTSTYLE = "font-style"

Field Value

string

CSS_KEY_FONTWEIGHT

the CSS tag for the font weight

public const string CSS_KEY_FONTWEIGHT = "font-weight"

Field Value

string

CSS_KEY_LINEHEIGHT

the CSS tag for text decorations

public const string CSS_KEY_LINEHEIGHT = "line-height"

Field Value

string

CSS_KEY_MARGIN

the CSS tag for the margin of an object

public const string CSS_KEY_MARGIN = "margin"

Field Value

string

CSS_KEY_MARGINBOTTOM

the CSS tag for the margin of an object

public const string CSS_KEY_MARGINBOTTOM = "margin-bottom"

Field Value

string

CSS_KEY_MARGINLEFT

the CSS tag for the margin of an object

public const string CSS_KEY_MARGINLEFT = "margin-left"

Field Value

string

CSS_KEY_MARGINRIGHT

the CSS tag for the margin of an object

public const string CSS_KEY_MARGINRIGHT = "margin-right"

Field Value

string

CSS_KEY_MARGINTOP

the CSS tag for the margin of an object

public const string CSS_KEY_MARGINTOP = "margin-top"

Field Value

string

CSS_KEY_PADDING

the CSS tag for the margin of an object

public const string CSS_KEY_PADDING = "padding"

Field Value

string

CSS_KEY_PADDINGBOTTOM

the CSS tag for the margin of an object

public const string CSS_KEY_PADDINGBOTTOM = "padding-bottom"

Field Value

string

CSS_KEY_PADDINGLEFT

the CSS tag for the margin of an object

public const string CSS_KEY_PADDINGLEFT = "padding-left"

Field Value

string

CSS_KEY_PADDINGRIGHT

the CSS tag for the margin of an object

public const string CSS_KEY_PADDINGRIGHT = "padding-right"

Field Value

string

CSS_KEY_PADDINGTOP

the CSS tag for the margin of an object

public const string CSS_KEY_PADDINGTOP = "padding-top"

Field Value

string

CSS_KEY_PAGE_BREAK_AFTER

the CSS tag for adding a page break when the document is printed

public const string CSS_KEY_PAGE_BREAK_AFTER = "page-break-after"

Field Value

string

CSS_KEY_PAGE_BREAK_BEFORE

the CSS tag for adding a page break when the document is printed

public const string CSS_KEY_PAGE_BREAK_BEFORE = "page-break-before"

Field Value

string

CSS_KEY_TEXTALIGN

the CSS tag for the horizontal alignment of an object

public const string CSS_KEY_TEXTALIGN = "text-align"

Field Value

string

CSS_KEY_TEXTDECORATION

the CSS tag for text decorations

public const string CSS_KEY_TEXTDECORATION = "text-decoration"

Field Value

string

CSS_KEY_VERTICALALIGN

the CSS tag for text decorations

public const string CSS_KEY_VERTICALALIGN = "vertical-align"

Field Value

string

CSS_KEY_VISIBILITY

the CSS tag for the visibility of objects

public const string CSS_KEY_VISIBILITY = "visibility"

Field Value

string

CSS_VALUE_ALWAYS

value for the CSS tag for adding a page break when the document is printed

public const string CSS_VALUE_ALWAYS = "always"

Field Value

string

CSS_VALUE_BLOCK

CSS values

public const string CSS_VALUE_BLOCK = "block"

Field Value

string

CSS_VALUE_BOLD

a CSS value for text font weight

public const string CSS_VALUE_BOLD = "bold"

Field Value

string

CSS_VALUE_HIDDEN

the value if you want to hide objects.

public const string CSS_VALUE_HIDDEN = "hidden"

Field Value

string

CSS_VALUE_INLINE

A possible value for the DISPLAY key

public const string CSS_VALUE_INLINE = "inline"

Field Value

string

CSS_VALUE_ITALIC

a CSS value for text font style

public const string CSS_VALUE_ITALIC = "italic"

Field Value

string

CSS_VALUE_LINETHROUGH

a CSS value for text decoration

public const string CSS_VALUE_LINETHROUGH = "line-through"

Field Value

string

CSS_VALUE_LISTITEM

A possible value for the DISPLAY key

public const string CSS_VALUE_LISTITEM = "list-item"

Field Value

string

CSS_VALUE_NONE

a CSS value

public const string CSS_VALUE_NONE = "none"

Field Value

string

CSS_VALUE_NORMAL

a CSS value

public const string CSS_VALUE_NORMAL = "normal"

Field Value

string

CSS_VALUE_OBLIQUE

a CSS value for text font style

public const string CSS_VALUE_OBLIQUE = "oblique"

Field Value

string

CSS_VALUE_TABLE

A possible value for the DISPLAY key

public const string CSS_VALUE_TABLE = "table"

Field Value

string

CSS_VALUE_TABLECELL

A possible value for the DISPLAY key

public const string CSS_VALUE_TABLECELL = "table-cell"

Field Value

string

CSS_VALUE_TABLEROW

A possible value for the DISPLAY key

public const string CSS_VALUE_TABLEROW = "table-row"

Field Value

string

CSS_VALUE_TEXTALIGNCENTER

the CSS value for a horizontal alignment of an object

public const string CSS_VALUE_TEXTALIGNCENTER = "center"

Field Value

string

CSS_VALUE_TEXTALIGNJUSTIFY

the CSS value for a horizontal alignment of an object

public const string CSS_VALUE_TEXTALIGNJUSTIFY = "justify"

Field Value

string

CSS_VALUE_TEXTALIGNLEFT

the CSS value for a horizontal alignment of an object

public const string CSS_VALUE_TEXTALIGNLEFT = "left"

Field Value

string

CSS_VALUE_TEXTALIGNRIGHT

the CSS value for a horizontal alignment of an object

public const string CSS_VALUE_TEXTALIGNRIGHT = "right"

Field Value

string

CSS_VALUE_UNDERLINE

a CSS value for text decoration

public const string CSS_VALUE_UNDERLINE = "underline"

Field Value

string

DEFAULT_FONT_SIZE

a default value for font-size @since 2.1.3

public const float DEFAULT_FONT_SIZE = 12

Field Value

float

HTML_ATTR_CSS_CLASS

attribute for specifying externally defined CSS class

public const string HTML_ATTR_CSS_CLASS = "class"

Field Value

string

HTML_ATTR_CSS_ID

The ID attribute.

public const string HTML_ATTR_CSS_ID = "id"

Field Value

string

HTML_ATTR_HEIGHT

the height attribute.

public const string HTML_ATTR_HEIGHT = "height"

Field Value

string

HTML_ATTR_HREF

HTML attributes

public const string HTML_ATTR_HREF = "href"

Field Value

string

HTML_ATTR_REL

This is a possible HTML attribute for the LINK tag.

public const string HTML_ATTR_REL = "rel"

Field Value

string

HTML_ATTR_STYLE

This is used for inline css style information

public const string HTML_ATTR_STYLE = "style"

Field Value

string

HTML_ATTR_STYLESHEET

This is a possible HTML attribute.

public const string HTML_ATTR_STYLESHEET = "stylesheet"

Field Value

string

HTML_ATTR_TYPE

This is a possible HTML attribute for the LINK tag.

public const string HTML_ATTR_TYPE = "type"

Field Value

string

HTML_ATTR_WIDTH

the width attribute.

public const string HTML_ATTR_WIDTH = "width"

Field Value

string

HTML_TAG_BODY

the markup for the body part of a file

public const string HTML_TAG_BODY = "body"

Field Value

string

HTML_TAG_DIV

HTML tags

public const string HTML_TAG_DIV = "div"

Field Value

string

This is a possible HTML-tag.

public const string HTML_TAG_LINK = "link"

Field Value

string

HTML_TAG_SPAN

The SPAN tag.

public const string HTML_TAG_SPAN = "span"

Field Value

string

HTML_VALUE_CSS

This is a possible HTML attribute for the LINK tag.

public const string HTML_VALUE_CSS = "text/css"

Field Value

string

HTML_VALUE_JAVASCRIPT

This is a possible value for the language attribute (SCRIPT tag).

public const string HTML_VALUE_JAVASCRIPT = "text/javascript"

Field Value

string

ITEXT_TAG

the key for any tag

public const string ITEXT_TAG = "tag"

Field Value

string

Methods

DecodeColor(string)

Converts a Color into a HTML representation of this Color .

public static BaseColor DecodeColor(string s)

Parameters

s string

the Color that has to be converted.

Returns

BaseColor

the HTML representation of this Color

ParseAttributes(string)

This method parses a string with attributes and returns a Properties object.

public static Properties ParseAttributes(string str)

Parameters

str string

a string of this form: 'key1="value1"; key2="value2";... keyN="valueN" '

Returns

Properties

a Properties object

ParseLength(string)

HTML values

public static float ParseLength(string str)

Parameters

str string

a length in the form of an optional + or -, followed by a number and a unit.

Returns

float

a float

ParseLength(string, float)

New method contributed by: Lubos Strapko @since 2.1.3

public static float ParseLength(string str, float actualFontSize)

Parameters

str string
actualFontSize float

Returns

float

RemoveComment(string, string, string)

Removes the comments sections of a String. the original String the String that marks the start of a Comment section the String that marks the end of a Comment section.

public static string RemoveComment(string str, string startComment, string endComment)

Parameters

str string
startComment string
endComment string

Returns

string

the String stripped of its comment section