*/
private static ICCProfileWrapper searchFirstICCProfile(PreflightContext context) throws ValidationException
{
PreflightDocument document = context.getDocument();
PDDocumentCatalog catalog = document.getDocumentCatalog();
COSBase cBase = catalog.getCOSObject().getItem(COSName.getPDFName(DOCUMENT_DICTIONARY_KEY_OUTPUT_INTENTS));
COSArray outputIntents = COSUtils.getAsArray(cBase, document.getDocument());
for (int i = 0; outputIntents != null && i < outputIntents.size(); ++i)
{
COSDictionary outputIntentDict = COSUtils.getAsDictionary(outputIntents.get(i), document.getDocument());
COSBase destOutputProfile = outputIntentDict.getItem(OUTPUT_INTENT_DICTIONARY_KEY_DEST_OUTPUT_PROFILE);
if (destOutputProfile != null)
{
try
{
PDStream stream = PDStream.createFromCOS(COSUtils.getAsStream(destOutputProfile,