Class XfdfObjectUtils
java.lang.Object
com.itextpdf.forms.xfdf.XfdfObjectUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static float[]convertColorFloatsFromString(String colorHexString) Converts string containing hex color code into an array of 3 integer values representing rgb color.private static StringconvertColorFloatToHex(float colorFloat) Converts float representation of the rgb color into a hex string representing the rgb color.(package private) static ColorconvertColorFromString(String hexColor) Converts string containing hex color code to Color object.(package private) static StringconvertColorToString(float[] colors) Converts an array of 3 floats into a hex string representing the rgb color.(package private) static StringconvertColorToString(Color color) Converts a Color object into a hex string representing the rgb color.(package private) static PdfStringconvertDashesFromArray(PdfArray dashesArray) Converts a PdfArray, representing a pattern of dashes and gaps to be used in drawing a dashed border, into a string containing float values.(package private) static PdfArrayconvertDashesFromString(String dashesString) Converts a string containing float values into a PdfArray, representing a pattern of dashes and gaps to be used in drawing a dashed border.(package private) static intconvertFlagsFromString(String flagsString) Converts a string containing a comma separated list of names of the flags into an integer representation of the flags.(package private) static StringconvertFlagsToString(PdfAnnotation pdfAnnotation) Converts an integer representation of the flags into a string with a comma separated list of names of the flags.(package private) static StringconvertFloatToString(float coord) Converts float value to string with UTF-8 encoding.(package private) static PdfArrayconvertFringeFromString(String fringeString) Converts a string containing 4 float values into a PdfArray, representing rectangle fringe.(package private) static StringconvertFringeToString(float[] fringeArray) Converts to string an array of floats representing the fringe.(package private) static StringconvertIdToHexString(String idString) Converts string containing id from decimal to hexadecimal format.(package private) static StringconvertJustificationFromIntegerToString(int justification) Converts an integer value representing a code specifying the form of quadding (justification) into a string containing justification value.(package private) static intconvertJustificationFromStringToInteger(String attributeValue) Converts a string containing justification value into an integer value representing a code specifying the form of quadding (justification).(package private) static StringconvertLineEndToString(float[] line) Returns a string representation of the end point of the line (x_2, y_2) based on given line array.(package private) static StringconvertLineStartToString(float[] line) Returns a string representation of the start point of the line (x_1, y_1) based on given line array.(package private) static float[]convertQuadPointsFromCoordsString(String coordsString) Converts a string containing 8*n float values into a float array, representing quadPoints.(package private) static StringconvertQuadPointsToCoordsString(float[] quadPoints) Converts a float array, representing quadPoints into a string containing 8*n float values.(package private) static RectangleconvertRectFromString(String rectString) Converts a string containing 2 or 4 float values into aRectangle.(package private) static StringconvertRectToString(Rectangle rect) Converts a Rectangle to a string containing 4 float values.(package private) static float[]convertVerticesFromString(String verticesString) Converts a string into an array of floats representing vertices.(package private) static StringconvertVerticesToString(float[] vertices) Converts an array of float vertices to string.(package private) static PdfNamegetHighlightFullValue(PdfName highlightMode) Converts H key value in the link annotation dictionary to Highlight value of xfdf link annotation attribute.(package private) static PdfNamegetStyleFullValue(PdfName style) Converts style (S key value) in the pdf annotation dictionary to style value of xfdf annotation attribute.
-
Constructor Details
-
XfdfObjectUtils
private XfdfObjectUtils()
-
-
Method Details
-
convertRectFromString
Converts a string containing 2 or 4 float values into aRectangle.- Parameters:
rectString- the annotation rectangle, defining the location of the annotation on the page in default user space units. The value is four comma separated real numbers which may be positive or negative: (xLeft, yBottom, xRight, yTop). If only two coordinates are present, they should representRectanglewidth and height.
-
convertFringeFromString
-
convertDashesFromString
-
convertDashesFromArray
-
convertJustificationFromStringToInteger
Converts a string containing justification value into an integer value representing a code specifying the form of quadding (justification). -
convertJustificationFromIntegerToString
Converts an integer value representing a code specifying the form of quadding (justification) into a string containing justification value. -
getHighlightFullValue
-
getStyleFullValue
-
convertRectToString
-
convertFloatToString
Converts float value to string with UTF-8 encoding. -
convertQuadPointsFromCoordsString
Converts a string containing 8*n float values into a float array, representing quadPoints. If the number of floats in the string is not a multiple of 8, returns an empty float array. -
convertQuadPointsToCoordsString
Converts a float array, representing quadPoints into a string containing 8*n float values. -
convertFlagsFromString
Converts a string containing a comma separated list of names of the flags into an integer representation of the flags. -
convertFlagsToString
Converts an integer representation of the flags into a string with a comma separated list of names of the flags. -
convertColorToString
Converts an array of 3 floats into a hex string representing the rgb color. -
convertColorToString
-
convertColorFloatToHex
Converts float representation of the rgb color into a hex string representing the rgb color. -
convertIdToHexString
-
convertColorFromString
-
convertColorFloatsFromString
Converts string containing hex color code into an array of 3 integer values representing rgb color. -
convertVerticesToString
Converts an array of float vertices to string. -
convertFringeToString
Converts to string an array of floats representing the fringe. If the number of floats doesn't equal 4, an empty string is returned. -
convertVerticesFromString
Converts a string into an array of floats representing vertices. -
convertLineStartToString
Returns a string representation of the start point of the line (x_1, y_1) based on given line array. If the line array doesn't contain 4 floats, returns an empty string.- Parameters:
line- an array of 4 floats representing the line (x_1, y_1, x_2, y_2)
-
convertLineEndToString
Returns a string representation of the end point of the line (x_2, y_2) based on given line array. If the line array doesn't contain 4 floats, returns an empty string.- Parameters:
line- an array of 4 floats representing the line (x_1, y_1, x_2, y_2)
-