Pdfmake: CMYK Color export.

Created on 12 Jan 2017  路  5Comments  路  Source: bpampuch/pdfmake

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?

Most helpful comment

Color can specify in CMYK format with array. Simple example:

var dd = {
    content: [
        {
            text: 'First paragraph',
            color: [100, 0, 0, 0]           
        },
    ]
}

All 5 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

m-brudi picture m-brudi  路  3Comments

svenyonson picture svenyonson  路  3Comments

qgliu picture qgliu  路  3Comments

einfallstoll picture einfallstoll  路  3Comments

MathLavallee picture MathLavallee  路  3Comments