PhantomJS + CMYK color css3

586 views Asked by At

I need to create a pdf from an html document containing text with a color represented in CMYK similar to this example:

<div style="color: cmyk(100,0,0,0)">Lorem ipsum dolor sit amet, consectetur adipiscing elit</div>

I tried to generate the pdf with 1.9 phantomJS on linux, but the text color is always black. PhantomJS supports CMYK colors? How they should be used?

Regards

1

There are 1 answers

0
Artjom B. On

PhantomJS 1.x is based on an old QtWebKit fork from around 2010/2011 or comparable to Chrome 13. Around that time the CSS Color Module Level 3 specification was introduced which doesn't contain a cmyk function whereas the current CSS Color Module Level 4 draft contains the device-cmyk function.

It is just too new. It is possible that it will be supported in PhantomJS 2.x, but I don't think it will.