How to get ICC Profile from Illustrator.Document ?

I am using CS5 SDK and I have an Illustrator.Document object.  I want to get the path to the ICC profile(s) associated with that document (RGB, CMYK, Greyscale).  How can I get to those?
Thanks,
...Matt

A little, since I'm a C++ guy
That said, I've looked through the headers and there's slim pickings on ICC profiles. I seem to recall others have asked similar questsions and run into problems with the lack of API support.
The only thing I can find is this in AIOverrideColorConversion.h:
AIAPI AIErr ( *GetWSProfile )( const ASUInt32 whichProfile, AIColorProfile *profile );
AIAPI ASUInt32  ( *GetOpenPolicy )(AIColorProfile *profile, ASUInt32 colorModel, ASBoolean isLink, ASBoolean linkHasMultipleProfiles);
AIAPI AIErr ( *GetProfileData ) (const AIColorProfile profile, ASUInt32 *size, void *data );
AIAPI AIErr ( *GetProfileName) (const AIColorProfile profile, ai::UnicodeString& profileName ) ;
There's documentation associated with those calls, but pasting them is a problem because the editor interprets the tabs as tables
Does that sound like what you want? If so, check out that header and look up those methods -- see if what they describe sounds useful. Presumably there's something similar somewhere in the C# API.

Similar Messages

  • How to get color group from illustrator into flash

    Hi,
    I have difficulties with the color management between Illustrator and Flash.
    I have the original vector files in Illustrator and would like to use the color groups, I have in Illustrator, also in Flash.
    One way doing it is using the Kuler.
    But I can not get the colors from Illustrator into Kuler.
    Can someone advice how to manage that process?
    Many thanks in advance!

    I'm fairly new to this having only recently started using these tools again after six years, but will try to help! Go to "Explore", find a theme you like and click the "Edit" selection when you mouse over it. From there you can edit it or save a copy of it as is as whatever name you wish. In Photoshop or Illustrator, they will now show up in Adobe Color Themes (Window > Extensions > Adobe Color Themes) under "All Themes" in the drop menu. In these apps (and others that are Adobe Color Theme aware), any themes that you favorite on the site will show up under "My Favorites".
    If you're using Fireworks, it's different as it still uses Kuler (Window > Extensions > Kuler).  Themes you save or favorite on the site don't automatically show up there, however you can search for themes by name, and if you select "Custom" from the theme group dropdown, you can enter up to four names that will show up in that dropdown menu and produce as many results as the window can hold for an individual term. For instance, I saved a theme as "Copy of Industrial Calm" which if I enter in the search box, the "group" is a group of one. However, if I just type "Industrial", the window fills with options, yet there are MANY more results on the Adobe Color site and you would have to be specific to get the right one in that window.
    Hope that helps.

  • How to get icc profil?

    hi,
    I would to get the icc profil of a document in my plugin. But i don't find the method to set it.

    Which command throws the exception? Try the following:
    for (int j=0; j<eleNum; j++)
        pdeElement = PDEContentGetElem(pdeContent, j);
        if (PDEObjectGetType((PDEObject)pdeElement) == kPDEImage)
            PDEImage theImage = (PDEImage) pdeElement;
            PDEColorSpace theColorSpace = PDEImageGetColorSpace(theImage);
            ASAtom cpName = PDEColorSpaceGetName(theColorSpace);
            const char* colorSpaceName = ASAtomGetString(cpName);
            AVAlertNote(colorSpaceName);

  • Get icc-profile from a image

    Is ist possible to get the ICC-profile of a image
    I try this with  a Adobe RGB 1998 with embeded profile:
    alert(app.activeDocument.selection[0].graphics[0] .profile);
    alert(app.activeDocument.selection[0].graphics[0] .space);
    But it only return  "Emdeded" for .profile and "RGB" for .space. But i want it to return adobe rgb 1998
    Is it possible?

    I can't think nothing better than temporarily open the link in Photoshop and get its embedded profile from there:
    #target indesign
    #targetengine "session"
    if (!BridgeTalk.isRunning("photoshop")) {
         alert("Photoshop is not running.");
    else {
         var link = app.selection[0].graphics[0].itemLink;
         CreateBridgeTalkMessage(link.filePath);
    function CreateBridgeTalkMessage(filePath) {
         var bt = new BridgeTalk();
         bt.target = "photoshop";
         var script = GetProfile.toString() + "\r";
         script += "GetProfile(\""  + filePath + "\");";
         bt.body = script;
         // $.writeln(script);
         bt.onResult = function(resObj) {
              var result = resObj.body;
              DisplayProfile(result);
         bt.send(100);
    function GetProfile(filePath) {
         try {
              app.displayDialogs = DialogModes.NO;
              var psDoc = app.open(new File(filePath));
              var prof = app.activeDocument.colorProfileName;
              psDoc.close(SaveOptions.DONOTSAVECHANGES);
              app.displayDialogs = DialogModes.ALL;
              return prof;
         catch(err) {
              psDoc.close(SaveOptions.DONOTSAVECHANGES);
              app.displayDialogs = DialogModes.ALL;
    function DisplayProfile(result) {
         alert( "Color profile is \"" + ((result == "undefined") ? "Not embedded" : result) + "\"");

  • How to get order type from reference  document

    Hi ABAP Gurus,
      I am working on pricing routines for return orders.
      in this return order i am getting reference docuemnt number .
      now i need to find that this reference document is sales order or invoice .
      how can i find  this .
      i know i need to use VBFA table . but i am confused in precedding and subsequent document.
    please guide me how can i find this.
    Thnaks,
    Neo

    > I am working on pricing routines for return
    >  orders.
    > in this return order i am getting reference docuemnt
    >  number .
    > now i need to find that this reference document is
    >  sales order or invoice .
    >  how can i find  this .
    > i know i need to use VBFA table . but i am confused
    >  in precedding and subsequent document.
    Since you mention the pricing routines, I guess you are working on a VOFM routine or a user exit. I think that Anji gave the best universal solution for finding the document type by using VBUK table. VBFA table should not be used for this purpose IMHO.
    Additionally, inside the VOFM routine or a user exit you might be able to use VBPA or XVBPA/YVBPA table - the field VGTYP will contain the reference document category for each line. C = order, M = invoice, there are several orders, which you can see in SE11.
    Just FYI "preceding document" in VBFA is the document that was created first. For example, a sales order is a "preceding document" and the corresponding outbound delivery is a "subsequent document".
    Hope this helps and good luck!

  • How to get real value from selectOneChoice with javascript?

    Hi,
    How to get real value from selectOneChoice with javascript? The event.getNewValue() only gets me the index of the selected item, not the value/title.
    JSF page:
    <af:resource type="javascript">
    function parseAddress(event)
    alert("new value: " + event.getNewValue());
    </af:resource>
    <af:selectOneChoice label="Location:" value="" id="soc4">
    <af:clientListener type="valueChange" method="parseAddress" />
    <f:selectItems value="#{Person.locations}" id="si7"/>
    </af:selectOneChoice>
    HTML :
    <option title="225 Broadway, New York, NY-10007" selected="" value="0">225 Broadway (Central Office)</option>
    <option title="90 Mark St., New York, NY-10007" value="1">90 Mark St. (Central Office)</option>
    Thanks a lot.

    Something I was missing ,
    You need to add valuePassThru="true" in your <af:selectOneChoice component. I have personally tested it and got the actual value in alert box. I hope this time you got the real solution. You can also test the following code by your end.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:panelBox text="PanelBox1" id="pb1">
    <af:selectOneChoice label="Set Log Level" id="soc1"
    value="#{SelectManagedBean.loggerDefault}"
    valuePassThru="true">
    <af:selectItem label="select one" value="First" id="s6"/>
    <af:selectItem label="select two" value="Second" id="s56"/>
    <af:clientListener method="setLogLevel" type="valueChange"/>
    </af:selectOneChoice>
    <af:resource type="javascript">
    function setLogLevel(evt) {
    var selectOneChoice = evt.getSource();
    var logLevel = selectOneChoice.getSubmittedValue();
    // var logLevelObject = AdfLogger.NONE;
    alert("new value is : " + logLevel);
    //alert(evt.getSelection);
    //alert(logLevelObject);
    evt.cancel();
    </af:resource>
    </af:panelBox>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • How to get the value from a JavaScript and send the same to Java file?

    Hi.
    How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
    Thanks and regards,
    Leslie V

    Yes, I am trying with web application.
    In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
    How to send this 'message' with and to the 'request'?
    Thanks for the help :-)
    The actual JS code is:
    function productdeselection()
    var i=0;
    var j=0;
    var deselectedproduct = new Array(5);
    var message = "Are you sure to delete Product ";
    mvi=document.forms[0].MVI;
    mei=document.forms[0].MEI;
    lpi=document.forms[0].LPI;
    if(null != mvi)
    ++i;
    if(null != mei )
    ++i;
    if(null != lpi)
    ++i;
    if(null != mvi && mvi.checked)
    deselectedproduct[++j]="MVI?";
    if(null != mei && mei.checked)
    deselectedproduct[++j]="GAP?";
    if(null != lpi && lpi.checked)
    deselectedproduct[++j]="LPI?";
    if( 0!=j)
    if(i!=j)
    for (x=0; x<deselectedproduct.length; x++)
    if(null != deselectedproduct[x])
    message =message+ "-" +deselectedproduct[x];
    alert(message);
    else
    //alert(" You cannot remove all products!");
    return false;
    return true;
    }

  • How to get a value from JavaScript

    How to get return value from Java Script and catch it in c++ code. I have tried following code, but its not working in my case.
    what I want is if it returns true then call some function if it returns false then do nothing, so how to get those values in c++
    ScriptData::ScriptDataType fDataType = resultData.GetType();
    if (fDataType == kTrue)
           CAlert::InformationAlert("sucess");
           //call some function
                        else
                                  CAlert::InformationAlert("Error");
         // do nothing
    JavaScript Code:
        if(app.scriptArgs.isDefined("paramkeyname1"))
               var value = app.scriptArgs.get("paramkeyname1");
               alert(value);
                return true;
      else
               alert ("SORRY");
               return false;

    How to get java script result into JSResult i m not getting it.
    I have wriiten follwing code in c++ :
              WideString scriptPath("\\InDesign\\Source1.jsx");
              IDFile scriptFile(scriptPath);
              InterfacePtr<IScriptRunner>scriptRunner(Utils<IScriptUtils>()->QueryScriptRunner(scriptFi le));
              if(scriptRunner)
                        ScriptRecordData arguments;
                        ScriptIDValuePair arg;
                        ScriptID aID;
                        ScriptData script(scriptFile);
                        ScriptData resultData;
                        PMString errorString;
                        KeyValuePair<ScriptID,ScriptData> ScriptIDValuePair(aID,script);
                        arguments.push_back(ScriptIDValuePair);
                        PMString paramkeyname1;
                        Utils<IScriptArgs>()->Save();
                        Utils<IScriptArgs>()->Set("paramkeyname1",scriptPath);
                        Utils<IScriptUtils>()->DispatchScriptRunner(scriptRunner,script,arguments,resultData,erro rString,kFalse);
                        Utils<IScriptArgs>()->Restore();
                        ScriptData::ScriptDataType fDataType = resultData.GetType(); // here i should get true or false which i m passing it from javascript code......not as s_boolean
                        if (fDataType == kTrue)
                                       //CAlert::InformationAlert("sucess");
                                     iOrigActionComponent->DoAction(ac, actionID, mousePoint, widget);
                        else
                                    this->PreProcess(PMString(kCstAFltAboutBoxStringKey));
    Java script code:
    function main()
           var scrpt_var;
           var scriptPath,scrptMsg;
           var frntDoc=app.documents[0];
           if(app.scriptArgs.isDefined("paramkeyname1"))
               var value = app.scriptArgs.get("paramkeyname1");
                alert(value);
                 return true; // i want this value i should get in c++ code...How to get these values in c++
           else
              alert ("Error");
              return false; // i want this value i should get in c++ code...How to get these values in c++

  • How to get the values from html:select? tag..?

    i tried with this, but its not working...
    <html:select styleClass="text" name="querydefs" property="shortcut"
                 onchange="retrieveOptions()" styleId="firstBox" indexed="true">
    <html:options collection="advanced.choices" property="shortcut" labelProperty="label" />
    </html:select>
                        <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>

    <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>This java script is not working at all..its not printing anything in document.write();
    This is code..
    <td class="rowcolor1" width="20%">
    <html:select styleClass="text" name="querydefs" property="shortcut"
                             onchange="retrieveSecondOptions()" styleId="firstBox"
                             indexed="true">
                             <html:options collection="advanced.choices" property="shortcut"
                                  labelProperty="label"  />
                        </html:select>i tried with this also. but no use..i'm not the getting the seleced option...
    function retrieveOptions(){
    firstBox = document.getElementById('firstBox');
                             if(firstBox.selectedIndex==0){
          return;
        selectedOption = firstBox.options[firstBox.selectedIndex].value;
    }actually , how to get the values from <html:select> ...?
    my idea is to know which value is selected from the combo box(<html:select> ) if that value is equal some string i have enable a hyperlink to open a popup window

  • How to get the values from struct data type using java code..?

    Hi ,
    I am newer to java.
    we are using oracle database.
    How to get the data from struct data type using java code.
    Thanks in Advance.
    Regards,
    kumar

    Hi Rajeev,
    To retrieve a FilterContainer you will need to traverse the report structure:
    ReportStructure boReportStructure = boDocumentInstance.getStructure();
    ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
    FilterContainer boFilterContainer = null;
    if (boReportContainer.hasFilter()) {
         boFilterContainer = boReportContainer.getFilter();
    } else {
         boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
    Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
    Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
    Hope this helps.
    Regards,
    Dan

  • How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?

    How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?
    any idea?

    Hi,
    From your description, my understanding is that you want to get user profile properties in provider-hosted app in SharePoint online using REST API.
    Here is sample code for getting user profile properties:
    http://www.vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html
    Here is a blog below about accessing data from the provider-host apps:
    http://dannyjessee.com/blog/index.php/2014/07/accessing-sharepoint-data-from-provider-hosted-apps-use-the-right-context/
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to embed ICC profile

    Hello,
    I'm trying to embed an icc profile in a pdf, I am actually doing like this:
      char *filePath=NULL;
              ASPathName ICCPath;
              asprintf(&filePath,"%s/ICC_PROFILES/%s",DataDirName,profileName);
      #if !macosx
                        ICCPath = ASFileSysCreatePathFromDIPath(NULL,filePath,NULL);
              #else
                        ICCPath = GetMacPath(filePath);
              #endif
              ASFile iccProfile = NULL;
              ASFileSysOpenFile (NULL, ICCPath, ASFILE_READ, (ASFile *)&iccProfile);
              ASStm asStmICC = ASFileStmRdOpen(iccProfile,0);
              int tmp = ASFileGetEOF(iccProfile);
              char* buff=calloc(tmp,1);
              ASStmRead(buff,1,tmp,asStmICC);
              AC_Profile profil = NULL;
              ACMakeBufferProfile(&profil,buff,tmp);
              PDDocColorConvertEmbedOutputIntent(pdDoc,profil);
    it's kind of work since I have the icc profile inside my pdf file (I can see it with vim)
    but I'm having issue when trying to open it with Photoshop ... Photoshop don't see the embeded profile.
    any idea ?
    Regards,
    William

    An OutputIntent Profile (which is what you are creating with the PDDoc call at the end) is NEVER used by PDF UNLESS the PDF is also compliant with one of the subset standards (eg. PDF/A, PDF/E, PDF/X) - see ISO 32000-1:2008, 14.11.5.
    Why are you setting this profile?  Is the PDF a single page with a single raster image?
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Wed, 19 Oct 2011 05:39:21 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: how to embed ICC profile
    how to embed ICC profile
    created by yokuju<http://forums.adobe.com/people/yokuju> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/3979415#3979415

  • How to get MAC address from IP address in LAN

    Hi all,
    How to get MAC address from IP address in LAN (windows or any OS), I would have all IP addresses of my LAN, so I would like to know all MAC address.
    Code examples are highly appreciated.
    Thanks & Regards,
    abel...

    abel wrote:
    Yeah that is only working for local system, but how to get remote system's MAC ..?
    Thanks for quick reply ...
    Edited by: abel on Jan 28, 2009 12:10 AMIt is my understanding that only one person ever found the holy grail which you seek. But sadly [_he's dead_|http://forums.sun.com/profile.jspa?userID=649366]
    As a curious aside how did you manage to get the list of IPs?

  • How to get PR no from RFQ no

    Dear All,
    How to get PR no from RFQ no

    Hi Dilip,
    You can find it in EKPO table as well.
    BANFN  Purchase requisition number
    BNFPO  Item number of purchase requisition
    For this you can get EBELN as purchase document number.
    Now Go to table EKKO, there enter above EBELN and get ANGNR (Quotation number) for the same.
    Hope this will help.
    Regards,
    Nitin.
    Edited by: Nitin Karamchandani on Dec 5, 2008 10:22 AM

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

Maybe you are looking for