code: public static int alignmentValue(String alignment) {
      	if (alignment == null) return Element.ALIGN_UNDEFINED;
          if (ALIGN_CENTER.equalsIgnoreCase(alignment)) {
              return Element.ALIGN_CENTER;
          }
          if (ALIGN_LEFT.equalsIgnoreCase(alignment)) {
              return Element.ALIGN_LEFT;
          }
          if (ALIGN_RIGHT.equalsIgnoreCase(alignment)) {
              return Element.ALIGN_RIGHT;
          }
          if (ALIGN_JUSTIFIED.equalsIgnoreCase(alignment)) {
              return Element.ALIGN_JUSTIFIED;
          }
          if (ALIGN_JUSTIFIED_ALL.equalsIgnoreCase(alignment)) {
              return Element.ALIGN_JUSTIFIED_ALL;
          }
          if (ALIGN_TOP.equalsIgnoreCase(alignment)) {
              return Element.ALIGN_TOP;
          }
          if (ALIGN_MIDDLE.equalsIgnoreCase(alignment)) {
              return Element.ALIGN_MIDDLE;
          }
          if (ALIGN_BOTTOM.equalsIgnoreCase(alignment)) {
              return Element.ALIGN_BOTTOM;
          }
          if (ALIGN_BASELINE.equalsIgnoreCase(alignment)) {
              return Element.ALIGN_BASELINE;
          }
          return Element.ALIGN_UNDEFINED;
      }
docs: Translates a String value to an alignment value.
  (written by Norman Richards, integrated into iText by Bruno)
  @param	alignment a String (one of the ALIGN_ constants of this class)
  @return	an alignment value (one of the ALIGN_ constants of the Element interface)