I am not sure if that is possible, as far as i know in javascript we can't make it. The purpose of export with colors of CMYK is for printing, which support only that colors.
This module(rgb-cmyk) has algorithm for transforming each pixel into CMYK color.
Is there a way to transform each pixel of pdf export?
Some kind of control over the colour-mode would be really useful given that some printers need CMYK and some need RGB.
Color can specify in CMYK format with array. Simple example:
var dd = {
content: [
{
text: 'First paragraph',
color: [100, 0, 0, 0]
},
]
}
@liborm85 This is not the same as the document colour mode. It seems that by PDFMake only creates docs in an RGB mode.
@Undistraction
Relevant issue in pdfkit (It is a library that uses pdfmake for creating pdf file): https://github.com/devongovett/pdfkit/issues/161.
=> Printer or viewer always convert into the color scheme, which supports.
@liborm85 Ah. Thanks. I always thought a PDF had to have a colour mode, but it appears individual elements have their own colour-modes, but the document itself has none.
Most helpful comment
Color can specify in CMYK format with array. Simple example: