On Sun, 2 Mar 2008, Finn Martensen wrote:
2008/3/2, Aditya Mahajan
: I have the following problem with TikZ: When I use the "patterns" library in a tikzpicture environment, the file is compiled without problems and creates a PDF file. However, Acrobat displays an error message "Could not find the ColorSpace named 'pgfprgb'". [...]
Can you please post a minimal example? I have compiled a few examples from the tikz manual by using all tikz librarries, but never had this problem.
It just discovered that it depends, e.g., on whether there is only one page with a tikzpicture or more pages with tikzpictures. To give code examples: the first works, but not the second
************************************** Code with no problems: ************************************** \usemodule[tikz] \usetikzlibrary[patterns] \starttext \starttikzpicture \fill[pattern=dots] (0,0) -- (0,1) -- (1,1) -- (1,0); \stoptikzpicture \stoptext
************************************** Code with problems: ************************************** \usemodule[tikz] \usetikzlibrary[patterns] \starttext \starttikzpicture \draw (0,0) -- (1,0); \stoptikzpicture \page \starttikzpicture \fill[pattern=dots] (0,0) -- (0,1) -- (1,1) -- (1,0); \stoptikzpicture \stoptext
I can reproduce this problem. On linux, with evince pdf viewer (2.21.91) I get "Error: Bad color space 'pgfprgb'", with Adobe reader (8.1.2) "Wrong operand type". The example does work fine with plain TeX and LaTeX. Something wrong in the way patterns are handled by tikz for context. I do not think that anyone on this list understands the internals of TikZ. Your best bet is to report this to the tikz-mailing list. Aditya