--- poppler-0.15.3-comment/poppler/PSOutputDev.cc- 2010-11-26 20:32:40.000000000 +0100 +++ poppler-0.15.3-comment/poppler/PSOutputDev.cc 2010-12-15 02:40:21.696328005 +0100 @@ -1130,6 +1130,7 @@ } processColors = 0; inType3Char = gFalse; + hasColorPattern = gFalse; #if OPI_SUPPORT // initialize OPI nesting levels @@ -1469,6 +1470,9 @@ writePS("/Foo exch /Form defineresource pop\n"); } else { writePS("end\n"); + if (hasColorPattern) { + writePS("% HasColorPattern\n"); + } writePS("%%DocumentSuppliedResources:\n"); writePS(embFontList->getCString()); if (level == psLevel1Sep || level == psLevel2Sep || @@ -4417,6 +4421,9 @@ switch (level) { case psLevel1: case psLevel1Sep: + if (state->getFillColorSpace()->getMode() == csPattern) { + hasColorPattern = gTrue; + } doImageL1(ref, NULL, invert, inlineImg, str, width, height, len); break; case psLevel2: @@ -4446,6 +4453,9 @@ break; case psLevel1Sep: //~ handle indexed, separation, ... color spaces + if (colorMap && maskColors) { + hasColorPattern = gTrue; + } doImageL1Sep(colorMap, gFalse, inlineImg, str, width, height, len); break; case psLevel2: @@ -4479,6 +4489,9 @@ break; case psLevel1Sep: //~ handle indexed, separation, ... color spaces + if (maskStr) { + hasColorPattern = gTrue; + } doImageL1Sep(colorMap, gFalse, gFalse, str, width, height, len); break; case psLevel2: --- poppler-0.15.3-comment/poppler/PSOutputDev.h- 2010-11-10 23:32:14.000000000 +0100 +++ poppler-0.15.3-comment/poppler/PSOutputDev.h 2010-12-15 02:37:00.957052275 +0100 @@ -440,6 +440,7 @@ GBool t3NeedsRestore; // set if a 'q' operator was issued GBool forceRasterize; // forces the page to be rasterized into a image before printing GBool displayText; // displayText + GBool hasColorPattern; // set if a level 1 file has a color pattern #if OPI_SUPPORT int opi13Nest; // nesting level of OPI 1.3 objects