Package com.itextpdf.text.html
Class HtmlEncoder
- java.lang.Object
-
- com.itextpdf.text.html.HtmlEncoder
-
@Deprecated public final class HtmlEncoder extends java.lang.ObjectDeprecated.since 5.5.2This class converts aStringto 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:
- '\n' becomes <BR>\n
- " becomes "
- & becomes &
- < becomes <
- > becomes >
- ASCII-characters from 128 till 255 are represented as &#xxx;
(with xxx = the value of the character)
Example:
String htmlPresentation = HtmlEncoder.encode("Marie-Thérèse Sørensen");for more info: see O'Reilly; "HTML: The Definitive Guide" (page 164)
- ASCII-characters from 000 till 031 are represented as &#xxx;
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.Stringencode(BaseColor color)Deprecated.Converts aBaseColorinto a HTML representation of thisBaseColor.static java.lang.Stringencode(java.lang.String string)Deprecated.Converts aStringto the HTML-format of thisString.static java.lang.StringgetAlignment(int alignment)Deprecated.Translates the alignment value.static booleanisNewLineTag(java.lang.String tag)Deprecated.Returns true if the tag causes a new line like p, br etc.
-
-
-
Method Detail
-
encode
public static java.lang.String encode(java.lang.String string)
Deprecated.Converts aStringto the HTML-format of thisString.- Parameters:
string- TheStringto convert- Returns:
- a
String
-
encode
public static java.lang.String encode(BaseColor color)
Deprecated.Converts aBaseColorinto a HTML representation of thisBaseColor.- Parameters:
color- theBaseColorthat has to be converted.- Returns:
- the HTML representation of this
BaseColor
-
getAlignment
public static java.lang.String getAlignment(int alignment)
Deprecated.Translates the alignment value.- Parameters:
alignment- the alignment value- Returns:
- the translated value
-
isNewLineTag
public static boolean isNewLineTag(java.lang.String tag)
Deprecated.Returns true if the tag causes a new line like p, br etc.- Since:
- iText 5.0.6
-
-