--- poppler-0.15.2/poppler/PSOutputDev.cc- 2010-11-10 23:31:51.000000000 +0100 +++ poppler-0.15.2/poppler/PSOutputDev.cc 2010-11-29 17:28:22.179651839 +0100 @@ -1130,6 +1128,7 @@ } processColors = 0; inType3Char = gFalse; + hasColorPattern = gFalse; #if OPI_SUPPORT // initialize OPI nesting levels @@ -1469,6 +1468,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 +4439,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: --- poppler-0.15.2/poppler/PSOutputDev.h- 2010-11-10 23:32:14.000000000 +0100 +++ poppler-0.15.2/poppler/PSOutputDev.h 2010-11-28 04:35:05.715312133 +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