addValidationError(ctx, new ValidationError(ERROR_GRAPHIC_OUTPUT_INTENT_INVALID_ENTRY,
"OutputIntent object uses a NULL Object"));
return;
}
ICC_Profile iccp = ICC_Profile.getInstance(stream.getByteArray());
PreflightConfiguration config = ctx.getConfig();
// check the ICC Profile version (6.2.2)
if (iccp.getMajorVersion() == 2)
{
if (iccp.getMinorVersion() > 0x40)
{
// in PDF 1.4, max version is 02h.40h (meaning V 3.5)
// see the ICCProfile specification (ICC.1:1998-09)page 13 - §6.1.3 :
// The current profile version number is "2.4.0" (encoded as 02400000h")
ValidationError error = new ValidationError(ERROR_GRAPHIC_OUTPUT_INTENT_ICC_PROFILE_TOO_RECENT,
"Invalid version of the ICCProfile");
error.setWarning(config.isLazyValidation());
addValidationError(ctx, error);
return;
} // else OK
}
else if (iccp.getMajorVersion() > 2)
{
// in PDF 1.4, max version is 02h.40h (meaning V 3.5)
// see the ICCProfile specification (ICC.1:1998-09)page 13 - §6.1.3 :
// The current profile version number is "2.4.0" (encoded as 02400000h"
ValidationError error = new ValidationError(ERROR_GRAPHIC_OUTPUT_INTENT_ICC_PROFILE_TOO_RECENT,