}
// destOutputProfile should be an instance of COSObject because of this is a object reference
if (destOutputProfile instanceof COSObject)
{
if (mapDestOutputProfile.containsKey(new COSObjectKey((COSObject) destOutputProfile)))
{
// the profile is already checked. continue
return;
}
else if (!mapDestOutputProfile.isEmpty())
{
// A DestOutputProfile exits but it isn't the same, error
addValidationError(ctx, new ValidationError(ERROR_GRAPHIC_OUTPUT_INTENT_ICC_PROFILE_MULTIPLE,
"More than one ICCProfile is defined"));
return;
}
// else the profile will be kept in the tmpDestOutputProfile if it is valid
}
// keep reference to avoid multiple profile definition
mapDestOutputProfile.put(new COSObjectKey((COSObject) destOutputProfile), true);
COSDocument cosDocument = ctx.getDocument().getDocument();
PDStream stream = PDStream.createFromCOS(COSUtils.getAsStream(destOutputProfile, cosDocument));
if (stream == null)
{
addValidationError(ctx, new ValidationError(ERROR_GRAPHIC_OUTPUT_INTENT_INVALID_ENTRY,