6 Replies Latest reply on Jun 3, 2009 10:13 AM by Sheldon Zacharias

    (VB) Set Color Profile within InDesign

    Sheldon Zacharias

      How would I load a specific color profile into InDesign or InDesign Server from within a script?

        • 1. Re: (VB) Set Color Profile within InDesign
          Kasyan Servetsky Level 5

          Set myInDesign = CreateObject("InDesign.Application.CS3")
          Rem Set CMYK profile
          myInDesign.ColorSettings.WorkingSpaceCMYK = "U.S. Web Coated (SWOP) v2"
          Rem Set RGB profile
          myInDesign.ColorSettings.WorkingSpaceRGB = "sRGB IEC61966-2.1"

          1 person found this helpful
          • 2. Re: (VB) Set Color Profile within InDesign
            Sheldon Zacharias Level 1

            Thanks for the reply, but I am finding that ColorSettings does not exist within the application object on InDesign Server.  Do you know how I would acomplish the same settings on InDesign Server?

             

            Thanks

            • 3. Re: (VB) Set Color Profile within InDesign
              Kasyan Servetsky Level 5

              I don't have InDesign Server, so I can't help you with it. Probably, this is one of its limitations: it can't do what desktop version can.

              • 4. Re: (VB) Set Color Profile within InDesign
                Harbs. Level 6

                ColorSettings are definitely there in the Server DOM. Something else 

                must be wrong...

                 

                Harbs

                1 person found this helpful
                • 5. Re: (VB) Set Color Profile within InDesign
                  Sheldon Zacharias Level 1

                  When I tried to access the ColorSettings, I got an error that it was not a property of the application object.  I'll take another look at it, based on what your telling me it must have been my mistake.  Thanks for the help.

                   

                   

                  --- I took a closer look at it and I have been able to set the color settings from VB using the following code:

                   

                  objInDesignApp =

                  New InDesignServer.Application

                  objInDesignApp.ColorSettings.CMSSettingsPath = "C:\Custom_Color_Settings.csf"

                   

                   

                   

                  This is working great, thanks for the help.

                   

                  BUT I am still having trouble setting the 'CMSSettingsPath' from a Javascript that I am updating.  Here is a snipit of code from the Javascript:

                   

                         app.textPreferences.useOpticalSize = false;
                         app.textPreferences.typographersQuotes = false;
                         app.textImportPreferences.useTypographersQuotes = false;   
                         app.taggedTextImportPreferences.useTypographersQuotes = false;
                         app.pasteboardPreferences.minimumSpaceAboveAndBelow = "300p";
                         app.textFramePreferences.firstBaselineOffset = FirstBaseline.CAP_HEIGHT;
                        
                         app.ColorSettings.CMSSettingsPath = "C:\Custom_Color_Settings.csf";

                   

                  It works fine until it gets to the ColorSettings ... it errors out with the following error:

                  "Object does not support the property or method 'ColorSettings' "

                   

                  Any ideas how to get this to work from the javascript?

                   

                  Thanks,

                  Sheldon

                  • 6. Re: (VB) Set Color Profile within InDesign
                    Sheldon Zacharias Level 1

                    I figured it out, the Javascript is case sensitive.

                     

                    app.colorSettings.cmsSettingsPath

                     

                    I spend too much time in VB and get too lazy with case.

                     

                    Thanks for your help,

                    Sheldon