Package com.itextpdf.text.html
Class HtmlUtilities
java.lang.Object
com.itextpdf.text.html.HtmlUtilities
Deprecated.
since 5.5.2
A class that contains some utilities to parse HTML attributes and content.
- Since:
- 5.0.6 (some of these methods used to be in the Markup class)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
alignmentValue
(String alignment) Deprecated.Translates a String value to an alignment value.static BaseColor
Deprecated.Converts aBaseColor
into a HTML representation of thisBaseColor
.static String
eliminateWhiteSpace
(String content) Deprecated.Helper class that reduces the white space in a Stringstatic int
getIndexedFontSize
(String value, String previous) Deprecated.Picks a font size from a series of predefined font sizes.static Properties
parseAttributes
(String string) Deprecated.This method parses a String with attributes and returns a Properties object.static float
parseLength
(String string) Deprecated.Parses a length.static float
parseLength
(String string, float actualFontSize) Deprecated.New method contributed by: Lubos Strapkostatic String
removeComment
(String string, String startComment, String endComment) Deprecated.Removes the comments sections of a String.
-
Field Details
-
DEFAULT_FONT_SIZE
public static final float DEFAULT_FONT_SIZEDeprecated.a default value for font-size- Since:
- 2.1.3
- See Also:
-
sizes
Deprecated. -
FONTSIZES
public static final int[] FONTSIZESDeprecated.A series of predefined font sizes.- Since:
- 5.0.6 (renamed)
-
-
Constructor Details
-
HtmlUtilities
public HtmlUtilities()Deprecated.
-
-
Method Details
-
parseLength
Deprecated.Parses a length.- Parameters:
string
- a length in the form of an optional + or -, followed by a number and a unit.- Returns:
- a float
-
parseLength
Deprecated.New method contributed by: Lubos Strapko- Since:
- 2.1.3
-
decodeColor
Deprecated.Converts aBaseColor
into a HTML representation of thisBaseColor
.- Parameters:
s
- theBaseColor
that has to be converted.- Returns:
- the HTML representation of this
BaseColor
-
parseAttributes
Deprecated.This method parses a String with attributes and returns a Properties object.- Parameters:
string
- a String of this form: 'key1="value1"; key2="value2";... keyN="valueN" '- Returns:
- a Properties object
-
removeComment
Deprecated.Removes the comments sections of a String.- Parameters:
string
- the original StringstartComment
- the String that marks the start of a Comment sectionendComment
- the String that marks the end of a Comment section.- Returns:
- the String stripped of its comment section
-
eliminateWhiteSpace
Deprecated.Helper class that reduces the white space in a String- Parameters:
content
- content containing whitespace- Returns:
- the content without all unnecessary whitespace
-
getIndexedFontSize
Deprecated.Picks a font size from a series of predefined font sizes.- Parameters:
value
- the new value of a font, expressed as an indexprevious
- the previous value of the font size- Returns:
- a new font size.
-
alignmentValue
Deprecated.Translates a String value to an alignment value. (written by Norman Richards, integrated into iText by Bruno)- Parameters:
alignment
- a String (one of the ALIGN_ constants of this class)- Returns:
- an alignment value (one of the ALIGN_ constants of the Element interface)
-