if (XOBJECT_DICTIONARY_VALUE_SUBTYPE_IMG.equals(subtype)) {
xObjVal = new XObjImageValidator(handler, dic);
} else if (XOBJECT_DICTIONARY_VALUE_SUBTYPE_FORM.equals(subtype)) {
xObjVal = new XObjFormValidator(handler, dic);
} else if (XOBJECT_DICTIONARY_VALUE_SUBTYPE_POSTSCRIPT.equals(subtype)) {
xObjVal = new XObjPostscriptValidator(handler, dic);
} else {
throw new ValidationException("Invalid XObject subtype");
}
return xObjVal.validate();