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());
PreflightConfiguration cfg = context.getConfig();
ColorSpaceHelperFactory csFact = cfg.getColorSpaceHelperFact();
csHelper = csFact.getColorSpaceHelper(context, pdCS, ColorSpaceRestriction.NO_RESTRICTION);
}
}
if (cs == null)
{
registerError("The ColorSpace is unknown", ERROR_GRAPHIC_UNEXPECTED_VALUE_FOR_KEY);
return;
}
if (csHelper == null)
{
PDColorSpace pdCS = PDColorSpaceFactory.createColorSpace(COSName.getPDFName(colorSpaceName));
PreflightConfiguration cfg = context.getConfig();
ColorSpaceHelperFactory csFact = cfg.getColorSpaceHelperFact();
csHelper = csFact.getColorSpaceHelper(context, pdCS, ColorSpaceRestriction.NO_RESTRICTION);
}