Patent ID: 7375852

Claim:
A method for supporting color spaces for publishing an electronic document comprising: receiving a command to output an electronic document in a first color space, the electronic document comprising color values of the first color space; generating a color mapping to map the color values of the electronic document from the first color space to color values of a second color space, wherein a single color value of the first color space is mapped to a range of color values of the second color space; converting each color value of the first color space of the electronic document into a color value of a second color space using the color mapping; providing the color values of the second color space and place holders to a graphics drawing engine that supports the second color space but not the first color space; creating by the graphics drawing engine drawing commands, the drawing commands comprising the color values of the second color space and the place holders as provided; receiving by a page description language print driver the drawing commands from the graphics drawing engine; creating by the page description language print driver a first printer file in a page description language that represents the electronic document, the first printer file comprising the color values of the second color space and the place holders as indicated by the received drawing commands, the first printer file having a first color setting function that indicates that electronic documents are to be rendered in the second color space; accessing the first printer file created by the page description language driver and creating a second printer file based on the first printer file, the second printer file created by substituting the place holders of the first printer file with the color mapping and a second color setting function, the second color setting function indicating that the electronic document is to be rendered in the first color space using the color mapping, the second color setting function used to override the first color setting function of the first printer file; and rendering the second printer file in the first color space according to the second color setting function of the second printer file, wherein the color mapping is used to convert the color values of the second color space of the second printer file to color values of the first color space.