Problem when setting CMYK colors

Hello,
I need to set colors in CMYK, but the colors returned in the PDF do not match the CMYK settings.

For example for black I’m using either (0,0,0,100) or
(100,100,100,100) but either gives me black color.

My sample code:

---------------------

Aspose.Pdf.TextInfo titleStyle = new Aspose.Pdf.TextInfo();
titleStyle.Color = new Color(100, 100, 100, 100);
titleStyle.Color.ColorSpaceType = ColorSpaceType.Cmyk;

Table tableTitle = (Table) tableCover.Rows[0].Cells[0].Paragraphs[“tableTitle”];
Text title = (Text) tableTitle.Rows[0].Cells[0].Paragraphs[0];
title.TextInfo = titleStyle;

--------------------------

Is there some setting I need to add?

Thanks

Dear nikita,

Thank you for considering Aspose.

Please refer to Text Formatting inside PDF in our programmer’s guide.

Hi,

This does not solve my problem. I need to set different colors for different sections of the page so I don’t see why I should use the text format inheritance.

My real problem is that the color returned in the PDF does not match the CMYK code. For example black (100,100,100,100) is shown as a dark grey.

I suppose there must be some way to set a CMYK color for a specific paragraph of the page (as I think I’m doing).

Thanks in advance,
Katrien

Dear Katrien,

Thank you for considering Aspose.

As you can see form the programmer’s guide, each text paragraph has one or more segments. Each segment inherits formatting info from the text paragraph. So when you have created the segments and then set the text’s formatting, it will not affect the segments. But you can use the method in “Changing text format for all segments”.