Class XfdfObjectUtils

java.lang.Object
com.itextpdf.forms.xfdf.XfdfObjectUtils

final class XfdfObjectUtils extends Object
  • Constructor Details

    • XfdfObjectUtils

      private XfdfObjectUtils()
  • Method Details

    • convertRectFromString

      static Rectangle convertRectFromString(String rectString)
      Converts a string containing 2 or 4 float values into a Rectangle.
      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 represent Rectangle width and height.
    • convertFringeFromString

      static PdfArray convertFringeFromString(String fringeString)
      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

      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.
    • convertDashesFromArray

      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.
    • convertJustificationFromStringToInteger

      static int convertJustificationFromStringToInteger(String attributeValue)
      Converts a string containing justification value into an integer value representing a code specifying the form of quadding (justification).
    • convertJustificationFromIntegerToString

      static String convertJustificationFromIntegerToString(int justification)
      Converts an integer value representing a code specifying the form of quadding (justification) into a string containing justification value.
    • getHighlightFullValue

      static PdfName getHighlightFullValue(PdfName highlightMode)
      Converts H key value in the link annotation dictionary to Highlight value of xfdf link annotation attribute.
    • getStyleFullValue

      static PdfName getStyleFullValue(PdfName style)
      Converts style (S key value) in the pdf annotation dictionary to style value of xfdf annotation attribute.
    • convertRectToString

      static String convertRectToString(Rectangle rect)
      Converts a Rectangle to a string containing 4 float values.
    • convertFloatToString

      static String convertFloatToString(float coord)
      Converts float value to string with UTF-8 encoding.
    • convertQuadPointsFromCoordsString

      static float[] convertQuadPointsFromCoordsString(String coordsString)
      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

      static String convertQuadPointsToCoordsString(float[] quadPoints)
      Converts a float array, representing quadPoints into a string containing 8*n float values.
    • convertFlagsFromString

      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.
    • convertFlagsToString

      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.
    • convertColorToString

      static String convertColorToString(float[] colors)
      Converts an array of 3 floats into a hex string representing the rgb color.
    • convertColorToString

      static String convertColorToString(Color color)
      Converts a Color object into a hex string representing the rgb color.
    • convertColorFloatToHex

      private static String convertColorFloatToHex(float colorFloat)
      Converts float representation of the rgb color into a hex string representing the rgb color.
    • convertIdToHexString

      static String convertIdToHexString(String idString)
      Converts string containing id from decimal to hexadecimal format.
    • convertColorFromString

      static Color convertColorFromString(String hexColor)
      Converts string containing hex color code to Color object.
    • convertColorFloatsFromString

      static float[] convertColorFloatsFromString(String colorHexString)
      Converts string containing hex color code into an array of 3 integer values representing rgb color.
    • convertVerticesToString

      static String convertVerticesToString(float[] vertices)
      Converts an array of float vertices to string.
    • convertFringeToString

      static String convertFringeToString(float[] fringeArray)
      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

      static float[] convertVerticesFromString(String verticesString)
      Converts a string into an array of floats representing vertices.
    • convertLineStartToString

      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. 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

      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. 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)