• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Read and change InDesign "Color settings" preferences from plugin C++ (SDK)

Explorer ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

Hi, 

 

Is it possible read and change InDesign Color preferences from C++ plugin?
I would like to handle profil settings.

 

Best regards

Karoly

TOPICS
SDK

Views

716

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 08, 2022 Dec 08, 2022

Hi Karoly, Not sure if this helps with the SDK, but with JavaScript you set the application and document color management settings like this:

 

//sets the application Color Settings:
app.colorSettings.properties = {cmykPolicy:ColorSettingsPolicy.COMBINATION_OF_PRESERVE_AND_SAFE_CMYK, 
    mismatchAskWhenOpening:false, 
    mismatchAskWhenPasting:false, 
    missingAskWhenOpening:false, 
    rgbPolicy:ColorSettingsPolicy.PRESERVE_EMBEDDED_PROFILES, 
    workingSpaceCMYK:"Coated GRACoL 2013", 
   
...

Votes

Translate

Translate
Community Expert ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

Hi Karoly, Not sure if this helps with the SDK, but with JavaScript you set the application and document color management settings like this:

 

//sets the application Color Settings:
app.colorSettings.properties = {cmykPolicy:ColorSettingsPolicy.COMBINATION_OF_PRESERVE_AND_SAFE_CMYK, 
    mismatchAskWhenOpening:false, 
    mismatchAskWhenPasting:false, 
    missingAskWhenOpening:false, 
    rgbPolicy:ColorSettingsPolicy.PRESERVE_EMBEDDED_PROFILES, 
    workingSpaceCMYK:"Coated GRACoL 2013", 
    workingSpaceRGB:"Adobe RGB (1998)"}

//sets the active document’s color management:
app.activeDocument.properties = {rgbProfile: "Adobe RGB (1998)", 
    rgbPolicy: ColorSettingsPolicy.PRESERVE_EMBEDDED_PROFILES, 
    cmykProfile:"Coated GRACoL 2013", 
    cmykPolicy:ColorSettingsPolicy.COMBINATION_OF_PRESERVE_AND_SAFE_CMYK}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

Hi Rob,

Thank you for your quick answer.
If I can't find a specific SDK solution, I'll try to call it from the C++ plugin.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

Use kColorPresetsSettingsSetCmdBoss / IID_ICOLORPRESETSSETTINGSDATA for the app workspace.

ItemList is empty.

How would you do the document changes shown by Rob in the UI? Is that document setup >> intent?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

How would you do the document changes shown by Rob in the UI?

 

Hi Dirk, There isn’t a way to directly set a document’s color management policies in the UI the way you can with javascript. To change an existing doc’s policies via the UI you have to close the document, open Color Settings, check Ask When Opening, open the document and follow the change prompts—it’s a pain, I use a script to do it.

 

I would think the SDK would also have a way to directly set the document’s policies—the equivalent of

 

app.activeDocument.rgbPolicy = ColorSettingsPolicy.PRESERVE_EMBEDDED_PROFILES

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

To figure these things out I run the debug build of InDesign, including a home-grown plug-in that produces tons of debug output and just perform the action in the UI. I must admit I just was too lazy to get VSCode going, create a jsx file and run your script. Also from an IDUG session years ago I faintly remember there was a way to get to this setting, could maybe have been per image. I also think the overall message was to use Bridge to change the setting across the Suite.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

I also think the overall message was to use Bridge to change the setting across the Suite.

 

Sync’ing Color Settings with Bridge doesn’t affect existing documents. CM Policies, which are what Karoly is trying to set, are saved with the document on creation and could be different than the application Color Settings’ Policies.

 

I use this:

 

https://shared-assets.adobe.com/link/44ccc51f-1c3d-458d-4249-15ecab654ece

 

Screen Shot 28.png

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

For documents, there is kSetDocProfilePolicyCmdBoss. I did not find an interface for IID_ISETDOCPROFILEPOLICYCMDDATA though, so a script request might actually be a good idea.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 09, 2022 Dec 09, 2022

Copy link to clipboard

Copied

I will check it a little later (in January) because I take trip.
Thank you Dirk and Rob!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2023 Jan 16, 2023

Copy link to clipboard

Copied

Hi all,

like to add that one should look into this script by Roland Dreger:

Color Script 1.0.8

https://www.rolanddreger.net/de/1/farbmanagement-in-adobe-indesign/#

 

The GUI should be in English with a non-German InDesign…

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 16, 2023 Jan 16, 2023

Copy link to clipboard

Copied

I will check it.
Thank you Uwe!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

LATEST

Than you for all response!

Best Regards
Karoly

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines