Skip to main content
Inspiring
Feb 17, 2022 9:59 AM UTC
Question

How to set colors for bookmarks in Vc++/win32

Hi,

I'm Using PDColorvalue object, I'm able to do Three colors(RGB)  to set for bookmarks.

PDColorValueRec red, blue, green;
//Define red
red.space = PDDeviceRGB;
red.value[0] = ASInt32ToFixed(1);
red.value[1] = 0;
red.value[2] = 0;

PDBookmarkSetcolor(aBookmark,&red).

 

How to set Remaining colors like CMYK(cyan,yellow,magento,black)same way? please suggest.

What should parameters will use?

 

[Question moved to the Acrobat SDK forum]

This topic is closed to new replies. Start a new post to keep the conversation going.

5 replies

Thom Parker
Community Expert
Community Expert
Feb 17, 2022 6:25 PM UTC

Convert the CMYK to RGB.  It's a simple calculation. 

 

 

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Inspiring
Feb 18, 2022 7:28 AM UTC

Already I tried that values and assigned no use.

Translate
Thom Parker
Community Expert
Community Expert
Feb 18, 2022 7:26 PM UTC

What code are you using?

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Legend
Feb 17, 2022 12:07 PM UTC

The PDF specification allows only DeviceRGB colours for bookmarks. It is impossible to specify any other colour (since it only takes the three color values, not the colour space).

Translate
Inspiring
Feb 18, 2022 7:29 AM UTC

Thank your kind information. Can i use color picker? After pick color and how to apply for bookmarks.

Please help on this.

Translate