protected override void ReadColorProfile()
{
PdfObject outputIntents = reader.Catalog.GetAsArray(PdfName.OUTPUTINTENTS);
if (outputIntents != null && ((PdfArray)outputIntents).Size > 0)
{
PdfStream iccProfileStream = null;
for (int i = 0; i < ((PdfArray)outputIntents).Size; i++)
{
PdfDictionary outputIntentDictionary = ((PdfArray)outputIntents).GetAsDict(i);
if (outputIntentDictionary != null)
{
PdfName gts = outputIntentDictionary.GetAsName(PdfName.S);
if (iccProfileStream == null || PdfName.GTS_PDFA1.Equals(gts))
{
iccProfileStream = outputIntentDictionary.GetAsStream(PdfName.DESTOUTPUTPROFILE);
if (iccProfileStream != null && PdfName.GTS_PDFA1.Equals(gts))
{
break;
}
}
}
}
if (iccProfileStream is PRStream)
{
colorProfile = ICC_Profile.GetInstance(PdfReader.GetStreamBytes((PRStream)iccProfileStream));
}
}
}