HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.html.HtmlEncoder Class Reference

Static Public Member Functions

static String Encode (String str)
 
static String Encode (Color color)
 
static String GetAlignment (int alignment)
 

Detailed Description

This class converts a String to the HTML-format of a String.

To convert the String, each character is examined:

  • ASCII-characters from 000 till 031 are represented as &#xxx;
    (with xxx = the value of the character)
  • ASCII-characters from 032 t/m 127 are represented by the character itself, except for:
    • '
      ' becomes <BR>
    • " becomes &quot;
    • & becomes &amp;
    • < becomes &lt;
    • > becomes &gt;
  • ASCII-characters from 128 till 255 are represented as &#xxx;
    (with xxx = the value of the character)

Example:

   String htmlPresentation = HtmlEncoder.Encode("Marie-Th&#233;r&#232;se S&#248;rensen");

for more info: see O'Reilly; "HTML: The Definitive Guide" (page 164)

Author
mario.nosp@m..mac.nosp@m.carin.nosp@m.i@ru.nosp@m.g.ac..nosp@m.be

Member Function Documentation

◆ Encode() [1/2]

static String iTextSharp.text.html.HtmlEncoder.Encode ( Color  color)
static

Converts a Color into a HTML representation of this Color.

Parameters
colorthe Color that has to be converted.
Returns
the HTML representation of this <COLOR>Color</COLOR>

◆ Encode() [2/2]

static String iTextSharp.text.html.HtmlEncoder.Encode ( String  str)
static

Converts a String to the HTML-format of this String.

Parameters
stringThe String to convert
Returns
a String

◆ GetAlignment()

static String iTextSharp.text.html.HtmlEncoder.GetAlignment ( int  alignment)
static

Translates the alignment value.

Parameters
alignmentthe alignment value
Returns
the translated value

The documentation for this class was generated from the following file: