Package com.itextpdf.forms.xfdf
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 String
convertColorFloatToHex
(float colorFloat) Converts float representation of the rgb color into a hex string representing the rgb color.(package private) static Color
convertColorFromString
(String hexColor) Converts string containing hex color code to Color object.(package private) static String
convertColorToString
(float[] colors) Converts an array of 3 floats into a hex string representing the rgb color.(package private) static String
convertColorToString
(Color color) Converts a Color object into a hex string representing the rgb color.(package private) static PdfString
convertDashesFromArray
(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 PdfArray
convertDashesFromString
(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 int
convertFlagsFromString
(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 String
convertFlagsToString
(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 String
convertFloatToString
(float coord) Converts float value to string with UTF-8 encoding.(package private) static PdfArray
convertFringeFromString
(String fringeString) Converts a string containing 4 float values into a PdfArray, representing rectangle fringe.(package private) static String
convertFringeToString
(float[] fringeArray) Converts to string an array of floats representing the fringe.(package private) static String
convertIdToHexString
(String idString) Converts string containing id from decimal to hexadecimal format.(package private) static String
convertJustificationFromIntegerToString
(int justification) Converts an integer value representing a code specifying the form of quadding (justification) into a string containing justification value.(package private) static int
convertJustificationFromStringToInteger
(String attributeValue) Converts a string containing justification value into an integer value representing a code specifying the form of quadding (justification).(package private) static String
convertLineEndToString
(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 String
convertLineStartToString
(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 String
convertQuadPointsToCoordsString
(float[] quadPoints) Converts a float array, representing quadPoints into a string containing 8*n float values.(package private) static Rectangle
convertRectFromString
(String rectString) Converts a string containing 2 or 4 float values into aRectangle
.(package private) static String
convertRectToString
(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 String
convertVerticesToString
(float[] vertices) Converts an array of float vertices to string.(package private) static PdfName
getHighlightFullValue
(PdfName highlightMode) Converts H key value in the link annotation dictionary to Highlight value of xfdf link annotation attribute.(package private) static PdfName
getStyleFullValue
(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 representRectangle
width and height.
-
convertFringeFromString
Converts a string containing 4 float values into a PdfArray, representing rectangle fringe. If the number of floats in the string is not equal to 4, returns and PdfArray with empty values. -
convertDashesFromString
Converts a string containing float values into a PdfArray, representing a pattern of dashes and gaps to be used in drawing a dashed border. -
convertDashesFromArray
Converts a PdfArray, representing a pattern of dashes and gaps to be used in drawing a dashed border, into a string containing float values. -
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
Converts H key value in the link annotation dictionary to Highlight value of xfdf link annotation attribute. -
getStyleFullValue
Converts style (S key value) in the pdf annotation dictionary to style value of xfdf annotation attribute. -
convertRectToString
Converts a Rectangle to a string containing 4 float values. -
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
Converts a Color object into a hex string representing the rgb color. -
convertColorFloatToHex
Converts float representation of the rgb color into a hex string representing the rgb color. -
convertIdToHexString
Converts string containing id from decimal to hexadecimal format. -
convertColorFromString
Converts string containing hex color code to Color object. -
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)
-