// The color space is unknown. Try to access the resources dictionary,
// the color space can be a reference.
Map<String, PDColorSpace> colorSpaces = this.getResources().getColorSpaces();
if (colorSpaces != null)
{
PDColorSpace pdCS = colorSpaces.get(colorSpace);
if (pdCS != null)
{
cs = ColorSpaces.valueOf(pdCS.getName());
PreflightConfiguration cfg = context.getConfig();
ColorSpaceHelperFactory csFact = cfg.getColorSpaceHelperFact();
csHelper = csFact.getColorSpaceHelper(context, pdCS, ColorSpaceRestriction.ONLY_DEVICE);
}
}
}
if (cs == null)
{
registerError("The ColorSpace is unknown", ERROR_GRAPHIC_UNEXPECTED_VALUE_FOR_KEY);
return;
}
}
if (csHelper == null)
{
PDColorSpace pdCS = PDColorSpaceFactory.createColorSpace(csInlinedBase);
PreflightConfiguration cfg = context.getConfig();
ColorSpaceHelperFactory csFact = cfg.getColorSpaceHelperFact();
csHelper = csFact.getColorSpaceHelper(context, pdCS, ColorSpaceRestriction.ONLY_DEVICE);
}