cs = ColorSpaces.valueOf(colorSpaceName);
} catch (IllegalArgumentException e) {
// ---- The color space is unknown.
// ---- Try to access the resources dictionary, the color space can be a
// reference.
PDColorSpace pdCS = (PDColorSpace) this.getColorSpaces().get(
colorSpaceName);
if (pdCS != null) {
cs = ColorSpaces.valueOf(pdCS.getName());
csHelper = ColorSpaceHelperFactory.getColorSpaceHelper(pdCS,
documentHandler, ColorSpaceRestriction.NO_RESTRICTION);
}
}