Exporting correct Hex colors via scripting

Hello all,
I need to export the fillColor of a paragraph style via scripting.
I can get the fillColor property of the paragraph style, and can also convert CMYK to Hex. However, I do realize that the color values shown in InDesign are in whatever Color Space the document is using.
My question is, is there a native API to convert the color values to a web safe color value? If not, how do I go about mapping the colors?
Additionally, I see that Adobe internally knows how to convert it to a proper hex color (screenshot attached - note the color property in the Export Tagging pane). If I cannot use some native API, is there a way to access the text in that pane?
Thanks all, in advance!

@DerKäse (btw. funny name) – there is an add() method for colors that will take a Object Color as argument.
Use that for your purpose.
Here an example for RGB:
var myDoc = app.documents[0];
var myColorName = "myNewRGBColor";
if(!myDoc.swatches.itemByName(myColorName).isValid){
    var myNewColor = myDoc.colors.add(
            name:myColorName,
            colorValue:[255,255,0], //A bright yellow
            model:ColorModel.PROCESS,
            space:ColorSpace.RGB
Here one for CMYK:
var myDoc = app.documents[0];
var myColorName = "myNewCMYKColor";
if(!myDoc.swatches.itemByName(myColorName).isValid){
    var myNewColor = myDoc.colors.add(
            name:myColorName,
            colorValue:[0,0,100,0], //A bright yellow
            model:ColorModel.PROCESS,
            space:ColorSpace.CMYK
Hope, that helps…
Uwe

Similar Messages

  • How to set layer color property via script?

    I'm looking for a way to set a layer's UI color property via script (see attached). Any help would be greatly appreciated!

    jrapczak2 wrote:
    Uhm.. wow. That's crazy complicated
    It is even more complicated to work with multi-selected layers.
    if( app.documents.length > 0 && versionCheck()  ){
         app.activeDocument.suspendHistory("Set Layer's Color", 'changeLayersColor()');
    function versionCheck()  { return app.version.match(/1[1|2]./) >= 11; };
    function changeLayersColor(){
         function setActiveLayerColor( color ) {
              var desc = new ActionDescriptor();
                   var ref = new ActionReference();
                   ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
              desc.putReference( charIDToTypeID('null'), ref );
                   var colorEnumDesc = new ActionDescriptor();
                   colorEnumDesc.putEnumerated( charIDToTypeID('Clr '), charIDToTypeID('Clr '), color );
              desc.putObject( charIDToTypeID('T   '), charIDToTypeID('Lyr '), colorEnumDesc );
              executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
         function getSelectedLayersIdx(){
                   var selectedLayers = new Array;
                   var ref = new ActionReference();
                   ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
                   var desc = executeActionGet(ref);
                   if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){
                        desc = desc.getList( stringIDToTypeID( 'targetLayers' ));
                         var c = desc.count
                         var selectedLayers = new Array();
                         for(var i=0;i<c;i++){
                             try{
                                  activeDocument.backgroundLayer;
                                  selectedLayers.push(  desc.getReference( i ).getIndex() );
                             }catch(e){
                                  selectedLayers.push(  desc.getReference( i ).getIndex()+1 );
                    }else{
                        var ref = new ActionReference();
                        ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "ItmI" ));
                        ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
                        try{
                             activeDocument.backgroundLayer;
                             selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" ))-1);
                        }catch(e){
                             selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" )));
                   return selectedLayers;
         function makeActiveByIndex( idx, visible ){
              if( idx.constructor != Array ) idx = [ idx ];
              for( var i = 0; i < idx.length; i++ ){
                   var desc = new ActionDescriptor();
                   var ref = new ActionReference();
                   ref.putIndex(charIDToTypeID( "Lyr " ), idx[i] );
                   desc.putReference( charIDToTypeID( "null" ), ref );
                   if( i > 0 ) {
                        var idselectionModifier = stringIDToTypeID( "selectionModifier" );
                        var idselectionModifierType = stringIDToTypeID( "selectionModifierType" );
                        var idaddToSelection = stringIDToTypeID( "addToSelection" );
                        desc.putEnumerated( idselectionModifier, idselectionModifierType, idaddToSelection );
                   desc.putBoolean( charIDToTypeID( "MkVs" ), visible );
                   executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
         var colors = ['None','Red','Orange','Yellow','Green','Blue','Violet','Grey'];
         var colorIDs = [charIDToTypeID('None'),
                                  charIDToTypeID( "Rd  " ),
                                  charIDToTypeID( "Orng" ),
                                  charIDToTypeID( "Ylw " ),
                                  charIDToTypeID( "Grn " ),
                                  charIDToTypeID( "Bl  " ),
                                  charIDToTypeID( "Vlt " ),
                                  charIDToTypeID( "Gry " )];
         var dlg = new Window( 'dialog', 'Change Layer Color' );
         dlg.ddColors= dlg.add("dropdownlist", undefined,  colors);
         dlg.ddColors.preferredSize.width = 100;
         dlg.ddColors.items[0].selected = true;
         dlg.ok = dlg.add('button',undefined,'Ok');
         dlg.cancel = dlg.add('button',undefined,'Cancel');
         var results = dlg.show();
         if( results == 1 ){
              var selectedLayers =  getSelectedLayersIdx();
              for( var l=0;l<selectedLayers.length;l++ ){
                   makeActiveByIndex( selectedLayers[l], false );
                   setActiveLayerColor( colorIDs[dlg.ddColors.selection.index] );
              makeActiveByIndex( selectedLayers,false );

  • Acrobat/Indesign does not export correct into the selected output intention (eci_iso_coated_v2_300)

    I use the CS6 suite with Acrobat XI at windows platform.
    When I want to save a file from InDesign as .pdf with output intention eci_iso_coated_v2_300 the result is a .pdf with more than 300% ink coverage.
    I tried to transform the result in Acrobat XI into this standard output intention, but also the result has more than 300 % ink coverage.
    What is the reason of this bug?
    Before with Acrobat X this worked without problems

    Hi Rob,
    I was told the new way to work would be to draw files via Bridge direct into the InDesign file
    and I thought automatically the color would not be changed.
    my colourmanagement setting in bridge for the whole CS6 was  ECI isocoated_V2_300
    The Illustrator file was saved without color profile.
    In this test file I used 3 kinds of black: background of pirate in cmyk 79,34 / 72,78 / 59,38 / 79,88 = ink coverage 291 %
    DÜSSELPIRATEN in “black” (if you would convert this in the file with the cmyk button it would be the same ink-percentage as before
    “e.V.” was set to 100 % k
    I set the preferences for Acrobat from InDesign CS6 as pdf X4 with profile eci isocoatedV2_300 in three ways:
    no color conversion
    convert to profile
    convert to profile keeping existing values
    in all tree files the pirates background has 322 % ink coverage instead of 291 %
    Why does Acrobat convert “black” in the wrong way?  If I click in Illustrator on the 4c button to convert the “black” into 4c it is 291% ink
    Acrobat should come to the same result with all profiles: iso coated V2 and iso coated V2_300
    The same happens also by saving as .pdf X3 or .X1
    The minimum what I expect is, that Acrobat reduces ink coverage for black to 300 %
    I also made test with the new ECI profiles for laminated prints from 2012.
    And with newspaper profiles
    In this case the ink coverage comes below 300 %, but only when I choose convert to profile.
    And then the 100 % k converts to cmyk, what I don’t want to have with text.
    Is there no way to reduce ink coverage below a special percentage without changing Text 100% k
    And is there a bug in Acrobat XI with the ECI IsoCoated_V2_300 Profile? For there is no color reduction below 300 % in all conversion settings.
    I can’t test this with Acrobat X or IX, for my computers with this software don’t run with CS6 64 bit.
    enclosed you find my files
    Kind regards
    Lutz Hanbueckers
    Hanbueckers Werbung GmbH
    Brandsackerstr. 5
    40764 Langenfeld
    P.O. Box 40 02 01
    40242 Düsseldorf
    Tel. +49 02173 1 09 44 - 0
    Fax +49 02173 1 09 44 - 10
    [email protected] <mailto:[email protected]>
    www.hanbueckers.de
    Visit our site
    Steady attractive offers!!!
    HR Düsseldorf B 26 480
    owner Manager: Lutz Hanbueckers
    Von: Rob Day [email protected]
    Gesendet: Samstag, 2. März 2013 04:26
    An: Hanbueckers Werbung
    Betreff: acrobat/Indesign does not export correct into the selected output intention (eci_iso_coated_v2_300)
    Re: acrobat/Indesign does not export correct into the selected output intention (eci_iso_coated_v2_300)
    created by Rob Day <http://forums.adobe.com/people/rob+day> in InDesign - View the full discussion <http://forums.adobe.com/message/5115613#5115613

  • JPEG, PNG, TGA, PDF changes hex color from PSD

    I work for a company where the CEO is very into brand colors. He has the hex values of all the branded colors memorized. One of the branded colors is blue ( hex: 0039a6 ). Obviously, if he looks at my psd and samples a the color, it will display 0039a6.
    However, whenever I save it out as a: jpg, tga, png, or pdf, the color's hex value will change to 1f419b. If he samples from one of those files, crisis! Wrong branded color!
    I've made 2 layers and filled with with both colors and as far as I can tell, they are exactly the same to the eye, even if they're overlapping. So I just want to know why this happens so I can explain myself if he ever runs over to my desk.
    Thanks!

    Oh right, this is happening with Photoshop and Illustrator, which is why is didn't post on an individual programs forums. I forgot to add that to my previous post. Do you recommend that I post in both the Photoshop and Illustrator sections?
    Edit: I did more tests. If I use the branded color 0039a6 in Illustrator and save it out as a png, tga, jpeg, pdf, and I then open one of those exported files in Photoshop, the hex value has changed.
    If I use the branded color in Photoshop, exporting a png keeps the color as the correct hex value. JPG doesn't, which makes sense due to compression. So now the question is, why are the files I'm exporting from Illustrator and opening in Photoshop showing different hex values. You would assume that the pngs should be okay from both Photoshop and Illustrator?

  • Devanagari font in layed out in Indesign (using IndicPlus) does not export correctly to a PDF.

    Namaste InDesign gurus,
          I have a problem at hand. Wondering if anyone has encoutered similar problem before? Any help is greatly appreciated. And if you're in San Francisco bay area - I can buy you a lunch :-)
    Short description: Devanagari font in layed out in Indesign (using IndicPlus) does not export correctly to a PDF. All the ligatures are assembled and displayed in the PDF.
    Adobe Indesign Version: InDesign CS5 Design Premium - regular U.S. version (not ME).
    Steps I took:
              I purchased CS5 Design Premium and also purchased the IndicPlus plugin to author sanskrit documents in InDesign. I create Sanskrit text using either of the following methods.
    1) Itranslator
    2) Paste the devanagari from the Itranslator directly into InDesign or paste it first into MSWord and then copy from MSWord and paste it to Indesign.
    It doesn't matter how I paste it. After I apply the IndicPlus character/paragraph style so that the sanskrit looks good in InDesign, when I try to export it to a PDF. The PDF does not display the ligatures currectly. It just lists all the characters in order without assembling.
    I've spent a lot of money buying CS5, IndicPlus and then I can't even create a simple PDF document from InDesign. It is very frustrating.
    Has anyone been able to successfully export a sanscrit document from InDesign PDF ?
    (Please let me know if my problem description needs more fleshing out).
    I could create the PDF from MSWord directly but I'm trying to use indesign to layout my book. If InDesign cannot export to PDF I'll just have to use MSWord for my book layout. I've spend probably scores of hours trying to learn InDeisn and formatting my book content - seems like it is all going to be waste.
    Is MSWord the best choice or only choice for laying out books that have sanskrit text in them?
    -Ravi

    Has anyone been able to successfully export a sanscrit document from InDesign PDF ?
    Not Sanskrit, no, but plenty of Hindi, Nepali, Marathi, and other languages written in Devanagari script - so it should be possible. I don't even use IndicPlus, which by most accounts makes working with Indic text much easier.
    1) Itranslator
    I've never seen this, but a quick Google led me to the homepage of ITranslator for Windows, where I saw this:
    Itranslator 99 (Build 1.3.0.86)  & New Beta Version
    uses 8-bit true type fonts and is compatible
    with Windows 95/98/ME/NT/2000/XP.
    For more information, click here.
    Itranslator 2003 (Build 2.0.0.38) & New Beta Version
    uses 16-bit Unicode-compatible fonts and is working
    only on Windows 2000 / XP / Server 2003.
    For more information, click here.
    So, if you're using ITranslator 99, there's the problem - those "8-bit true type fonts" won't work in InDesign. Can you post a sample of the text you're trying to paste into InDesign? Name the font(s) you are using, both in Word and in Indesign, and if possible make a small sample of the text available for us to test. It's also possible that InDesign is using a substituted font, which could cause this problem. So, if the font name in InDesign has brackets around it, you know that InDesign doesn't actually have that font installed and is auto-substituting. Also, if you go to View -> Screen Mode -> Normal and the text is highlighted pink, you know that the font has dropped. (Unless the highlighting for dropped fonts was turned off - check in Edit -> Preferences -> Composition and make sure that "Substituted Fonts" is checked.
    Also, for what it's worth, is there any way you could Place your text instead of copying and pasting? This may be cause of your problem - but even though it probably isn't, it's still worth a try.
    Lastly - no, I've found InDesign to be superior for typesetting for almost all languages, but the learning curve is pretty steep, and many of the problems faced by people working in non-English languages are not easy to research when you have a problem.

  • Set filename of printed PDF via script

    Hi folks!
    I have a little problem with generating a PDF. First my Workflow:
    I have a InDesign document with 6 pages. This document is merged with a databasefile containing 100 records. After merging it, we have to generate a PDF file. This PDF file is opened within acrobat. Within the document, I'm searching for an ID each record has so I can split the document to 100 files (each with 6 pages) and name it by the ID I found.
    The script within Acrobat is finished and working. I thought, the InDesign script is finished ,too. But I was wrong -.-
    I merged the databasefile with the document and exported it as PDF. But after exporting, we noticed that the script within Acrobat isn't finding the adressheader where the ID is in. The script only noticed the text after that header. The result is, that Acrobat get's always "null" as ID
    If we print the PDF with our PDFprinter, the header could be read by our Acrobat script. I don't know why this is... But now I changed the script to print the files via our PDF printer. Unfortunately I can't set a name for my exported file - do you know if there is a possibility to print PDF's without prompting after each one and with a via script given name?
    Here you can see the old script for InDesign and right after it, the Acrobat sript. Maybe I made some mistake by generating my PDFexport and don't need to use the printer?
    INDESIGN SCRIPT:
      * prompts filebrowser and stores name and path of file in variable
    var sourceDocument = File.openDialog("Bitte Indesign-Dokument auswählen", "*.indd", false);
      * stores only prefix of filename for use as new filename
    var newName = sourceDocument.name.substr(0,  sourceDocument.name.length-5);
      * stores folder where file is stored
    var dbSourceFolder = sourceDocument.parent+"/";
      * prompts for databasefile where generating should begin
    var dbstartfile = File.openDialog("Bitte Start-Datenbankdatei auswählen", "*.txt", false);
      * gets basename of databasefile
    var dbstartfilename = dbstartfile.name.slice(0, dbstartfile.name.search(/_Teil+/));
      * gets number of first databasefile
    var i = dbstartfile.name.slice(dbstartfile.name.search(/_Teil+/)+5).slice(0, -4);
      * generates path name and name of first databasefile to use
    var dbSource = dbstartfile;
       *set PDF preset for generating PDF
    var PDFPreset= app.pdfExportPresets.item("GAG-PDF");
       * stops throwing of alerts
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
    // if databasefile isn't existing message will be thrown
    if( dbSource.exists == false ) {
        // restart of alert throwing
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
        alert("Datei " + dbSourceFolder+dbprefix+"_Teil"+i+".txt konnte nicht gefunden werden! \n\rBitte starten Sie den Vorgang erneut und geben Sie die richtige Datenbankdatei an." );
    // else process starts
    else {
        while(  dbSource.exists == true ) {
            // opens source indesign document without showing it
            mergeDocument = app.open(File(sourceDocument), false);
            // sets which databasefile should be used for data merge
            mergeDocument.dataMergeProperties.selectDataSource(File(dbSource));
            // starts merging of indesign document and database file
            mergeDocument.dataMergeProperties.mergeRecords();
            // exports generated document as PDF file
            app.activeDocument.exportFile(ExportFormat.pdfType, File(sourceDocument.parent+"/"+newName+"_Teil"+i+".pdf"), false, PDFPreset);
            // closes opened indesign document
            mergeDocument.close(SaveOptions.no);
            i++;
            // change filename of database file to get next file
            dbSource = File(dbSource.parent+"/"+dbstartfilename+"_Teil"+i+".txt");
    // restart of alert throwing
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
    alert("PDF-Generierung abgeschlossen!");
    ACROBAT SCRIPT:
    * Path where files should be saved
    * Special Characters like spaces should be escaped with \
    * If you want to modify the folder, use following form:
    * "/Driveletter/Foldername/../LastFolderName/"
    * Make sure not to forget the / before and after the location
    var filepath = "/c/pdf_split_test/";
    * Number of expose pages - feel free to change
    var pageType = app.prompt("Bitte geben Sie die gewünschte Seitenzahl der Exposés an.", "");
    alert(pageType);
    * regular expression for search
    var idNumber = /08\d\d\d\d\-\d\d\d\-\d\d\d\d\d-\d\d\d-\d\d/g;
    * if possible this function extracts the searched number as string
    * @param rematch string which should be searched in document
    * @return null if rematch is not found or string if rematch is found
    function ExtractFromDocument(reMatch) {
      try {
             var Out = new Object();
             for (var i = 0; i < 1; i++)
              numWords = this.getPageNumWords(i);
              var PageText = "";
              for (var j = 0; j < 30;j++) {
                  var word = this.getPageNthWord(i,j,false);
                  PageText += word;
              var strMatches = PageText.match(reMatch);
              if (strMatches == null) continue;
          return strMatches;
      } catch(e)
          app.alert("Processing error: "+e)
    * tries to load given filename (extracted number)
    * @param filename string of file which should be checked
    * @param n number to iterate while checking for files
    * @return true if file exists or false if not
    function checkIfFileExists(filename, n) {
        var existingDoc = false;
        try {
            if( n == 0) {
                var checkDoc = app.openDoc(filepath+filename+"-000.pdf");
            } else {
                var checkDoc = app.openDoc(filepath+filename+"-000_"+n+".pdf");
            checkDoc.closeDoc();
            existingDoc = true;
        } catch (e) {
        if( existingDoc == true ) {
            n = n+1;
            n = checkIfFileExists(filename, n);
        return n;
    var pageAmount = this.numPages;
    for( i=0; i<pageAmount; i+pageType ) {
        var filename = ExtractFromDocument(idNumber);
        fileExistence = checkIfFileExists(filename, 0);
        if(fileExistence != 0) {
            this.extractPages({nEnd:(pageType-1), cPath : filepath+filename+"-000_"+fileExistence+".pdf"}); 
        } else {
            this.extractPages({nEnd:(pageType-1), cPath : filepath+filename+"-000.pdf"});
        this.deletePages({nStart:0, nEnd: pageType-1});

    Hi,
    I have a little problem with generating a PDF. First my Workflow:
    I have a InDesign document with 6 pages. This document is merged with a databasefile containing 100 records. After merging it, we have to generate a PDF file. This PDF file is opened within acrobat. Within the document, I'm searching for an ID each record has so I can split the document to 100 files (each with 6 pages) and name it by the ID I found.
    Why you don't export 6-page PDFs directly from InDesign?
    robin
    www.adobescripts.co.uk

  • Export to PDF color issues

    I'm working on a portfolio and having some problems with color when I export to a PDF.
    For example...if I draw a box in Indesign with a fill color of "black", with CMYK values of C=0 M=0 Y=0 and K=100...it appears dark dark black with in indesign. When I export that same page to a PDF, that same box is significantly lighter in shade, more gray than black.
    Anyone know what is going on here?
    I have screenshots but not sure how to upload them here.
    Thanks

    Hi Peter,
    Thanks for the info and I did follow through on your suggestion. What I discovered is that a custom printer profile may not necessarily correct the color shifts I'm experiencing--at least according to one Website. And since I'm in a job search mode, I'm watching my budget very closely, so this is something I'll investigate further in the future.
    I contacted HP to see if the problem might be associated with something else, and the tech seems to think it may have something to do with a slider function (that is not available on my printer software) that sets the color range from darker to brighter, since what I'm experiencing is a printout several shades darker than the display. The tech had me run a diagnostic test to try and pin down where the color shift is taking place, but my printer could not access the test, so a replacement printer is going to be sent to me.
    Again, thanks for the info, and I'll see what happens with the replacement printer.
    Pat

  • Firefox is not displaying the correct font color on my blog, but other browsers are.

    I have a web designer issue. Firefox is not displaying the correct font color on the header in my blog. Explorer, Chrome, and Safari have no problems. The page is in css but this particular section has html code o designate color. The code is as follows:
    <font face="helvetica" color="FF9966" size="1">blog</font>
    Though all other browsers display the light orange color designated, Firefox displays white. Strangely, if if retype the code by spelling out a color, Firefox displays it correctly. i.e.
    <font face="helvetica" color="black" size="1">blog</font>
    ... will give me black. You can see the effect by viewing the link below and looking at the word "blog" in the header, which should be light orange but is not in Firefox.

    Actually it also seems to work in the current Firefox 4 beta as it is.
    The code is not right though - the correct syntax for the color attribute with hex values is with a # at the start, so:
    color="#FF9966"
    It might work in Firefox 3.x if you change that.

  • How to get name of the slicer via script

    Hi Gurus,
    I was wondering if we could get the name of the slicer added in IR Query section, via script ??
    That is, I have a bqy connecting to Essbase OLAP.
    Now I am adding a slicer in OLAP Section via script.
    For Ex : ActiveDocument.Sections["Query2"].Slicers.Add('Market.Gen3,Market' , 'Market.LA')
    Now,for some reason, I wanted to retrieve the name of the slicer I added and assign it to a variable. Is this possible ?? I couldn't see any option for this. Please help me out if any one has done this before ?
    Thank You,
    Aji

    Sethil,
    Use your date(let us say Date1) instead of sy-datum.
    CALL FUNCTION 'MONTH_NAMES_GET'
    EXPORTING
    LANGUAGE = SY-LANGU
    IMPORTING
    RETURN_CODE =
    TABLES
    MONTH_NAMES = itab_month
    EXCEPTIONS
    MONTH_NAMES_NOT_FOUND = 1
    OTHERS = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE itab_month
    WITH KEY MNR = date1+4(2).
    itab_month-LTX will contain the value you are looking for
    Good luck
    Raghava

  • Advice for logical workflow for color correcting and color grading

    I am an experienced user of  PPRO CS5.  I am a novice with color correcting and color grading.  I am also just barely competant in AE CS5.  It has been suggested that I use AE for color correcting my footage.  Can you advise me as to the most logical workflow for doing this in coordination with PPRO CS5?  Are there some tutorials that you recommend?  I subscribe to Lynda.com and I think that they have some great tutorials, I am unsure as to where to begin looking and what to search for.
    Thanks so much,
    Lisa

    lisaellensegal wrote:
    I am an experienced user of  PPRO CS5.  I am a novice with color correcting and color grading.  I am also just barely competant in AE CS5.  It has been suggested that I use AE for color correcting my footage.
    You can do it that way, sure. But you don't have to. You can accomplish quite a lot without leaving PPro. This has two major advantages. First, if you aren't using AE for anything else, it gets you out of using AE at all, so gets you out of climbing another set  of learning curves.
    Second, even if you are using AE for other things (I use AE to make motion lower thirds, for example), doing the work in PPro can improve exporting speeds. This is because AE gets restricted to a single processor core in some workflows as discussed in this thread and others (search around if you're interested). This can make exporting take 3x as long or longer, depending on how much footage has to be processed by AE.
    So, how to do color correction without leaving PPro? Use either a luma corrector or luma curve effect to set black and white points, and contrast (use a waveform monitor to help). Then use a three way color corrector effect to get rid of any residual color casts (use the vectorscope to help, and the RGB parade, etc.).
    If you find you have specific colors that need to be fixed, you can apply another three way color correction effect and use it to make that secondary color correction (for example I find the blue dyes used in many labels tend to fluoresce under fluorescent lighting, and has to be desaturated with a secondary color correction or it "blooms" on an HDTV -- IOW, it has to be made "broadcast safe").
    If you want tutorials for using these tools, the ones on Creative Cow by Andrew Devis are quite good, and free. The ones on color correction with PPro cs6 start at tutorial number 47. There's a bunch of them. All good.
    Finally, get a copy of Van Hurkman's Color Correction Handbook. May be the best technical book I've ever read, and it'll certainly point you in the right direction for doing color correction work regardless of which tools you use to do it.

  • Error exporting Crystal Report with VB Script

    I am working with Crystal Reports and attempting to export a .RPT file to a .PDF file using a VBScript called from InSQL. I can get the script to work properly if I require a user entry for file destination and name (.export true) but get the error message "Missing or out-of-date export dll" when I attempt to export the .RPT silently (.export false). The report also exports correctly when I manually initiate the export from within Crystal Report. Do you have any examples or solutions for this procedure? Thank you in advance.
    Here is my code for the VBScript export:
    dim rptfile, exportfile
    dim strDate
    dim objCRRpt
    dim objCRApp
    strDate = "_" & right("0" & month(now()),2) & "_" & right("0" & day(now()),2) & "_" & year(now())
    rptfile = UCase("C:\CompCriticalAlarmReport_Test\Report1.rpt")
    exportfile = "C:\CompCriticalAlarmReport_Test\criticalalarmreport" & strDate & ".PDF"
    Set objCRApp = CreateObject("CrystalRuntime.Application")
    set objCRRpt = objCRApp.openreport(rptfile)
    With objCRRpt
         With .exportoptions
         .formattype = CrEFTCrystalReport
         .diskfilename = exportfile
         .destinationtype = CrEDTDiskFile
         .usereportdateformat = true
         .usereportnumberformat = true
         End With
    .export (false)
    End With
    Set objCRApp = Nothing
    set objCRRpt = Nothing

    Ludek, I downloaded the VBA Sample application using the Microsoft Access Database and it is coming up with the same error as my VBScript for the PDF export. The error message for this application is "Run-time error '-2147190908 (80047784)': Failed to export the report."
    Private Sub Image47_Click() 'Exporting to PDF
    'Defines report's format type
    Me.crxReport.ExportOptions.FormatType = crEFTPortableDocFormat
    'Defines report's destination type
    Me.crxReport.ExportOptions.DestinationType = crEDTDiskFile
    'Defines report's file name
    Me.crxReport.ExportOptions.DiskFileName = "C:\MyPDFfile.pdf"
    'exports without calling the exporting dialog window
    Me.crxReport.Export False        <----ERROR OCCURS ON THIS LINE
    When I Run the application with Me.crxReport.Export True, the application executes without error and a popup appears prompting me to select the destination and format type. I need this to run automatically though without a user prompt.
    I have seen numerous topics regarding the exportmodeller.dll, crtslv.dll, and atl.dll files improperly registering or the incorrect versions causing export problems. Could this be causing problems with my export functions? Again, the reports export fine when I manually export them, I am just having a problem when I try to export automatically in any format (excel, text, pdf, rpt, etc...)
    atrain10

  • Color profile script

    Is it possible to create a script that goes through a folder, and changes every .png file to use sRGB as color profile?
    Edit:
    To further describe my problem- I use a application that decrypt apples .png files so that they can be read in photoshop. But for some reason this script flips the blue and red channels too, making the colors messed up when i save a file.
    So basically, i need a script that opens every png file, and converts their color profile from sBGR to sRGB and then saves them.
    I already have a script that can convert PSD's to PNG's, but it does not edit the color profile, so if it could be edited to do that (And possibly also edit .png files) that would be awesome. the script:
    #target photoshop
    var imageFolder = Folder.selectDialog("Select top folder to process");
    var folderList=[];
    if (imageFolder != null)  {
    processFolder(imageFolder);
    folderList.unshift(imageFolder);
    createPNGfromPDF(folderList);
    function createPNGfromPDF(folderList){
    for(var a in folderList){
      var fileList = folderList[a].getFiles ("*.psd");
       for (var z in fileList){
        var file = fileList[z];
        open(file);
        var Name = fileList[z].name.replace(/\.[^\.]+$/, '');
        var saveFile = File(decodeURI(fileList[z].path+"/"+Name+".png"));
        SavePNG(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    function processFolder(folder) {
        var fileList = folder.getFiles()
         for (var i = 0; i < fileList.length; i++) {
            var file = fileList[i];
    if (file instanceof Folder) {
      folderList.push(file); 
           processFolder(file);
    function SavePNG(saveFile){
        pngSaveOptions = new PNGSaveOptions();
        pngSaveOptions.embedColorProfile = true;
        pngSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
        pngSaveOptions.matte = MatteType.NONE;
        pngSaveOptions.quality = 1;
    pngSaveOptions.PNG8 = false;
        pngSaveOptions.transparency = true;
    activeDocument.saveAs(saveFile, pngSaveOptions, true, Extension.LOWERCASE);

    convertProfile (destinationProfile, intent [, blackPointCompensation] [, dither])
    That is the javascript syntax of the line you would need to add to your script. The square bracketed parameters are optional the other are required. You need to supply the color profile and intent prams.  If you want to use scripting you need to learn a bit about programming in a scripting language javascript is the best choice for there a version for both the MAC and PC Windows platforms.  There are many script you can download and HACK on then.  Without some knowledge you will not be able to hack. If your do not have the time to read and gain the required khowledge you may want to look into Photoshop  Actions they are much easier to record and edit. It would be very easy to record an action to convert an image to the sRGB color space. The action could then be batched. The file>Automat>Batch... Will open a dialog thtat you use to point to your png folder the action set and action and thers is an option to save and close  them.
    A one step action can do what you want. Record ment Edit>Convert to Profile.  In the Convert to Profile dialod use the destination space  pull-down meny and choose sRGB then click OK.  When you play the action no dialog will be displayed the document will just ne converted to the sRGB color space. Batch that Action.
    If you know nothing about actions either my crafting actions package may be of some help.
    http://www.mouseprints.net/old/dpr/JJMacksCraftingActions.zip
    Contains:
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action http://www.mouseprints.net/old/dpr/WM900x600.jpg
    Sample Actions.txt Photoshop CraftedActions set saved as a text file. This file has some additional comments I inserted describing how the actions work.
    12 Scripts for actions
    Message was edited by: JJMack

  • Help: apply different para styles to several consecutive paragraphs via script

    Hi all,
    I need to apply different para styles to several consecutive paragraphs via script, something like this (found somewhere on the net):
    var myDoc = app.documents[0];
    var mySel = app.selection[0];
    var myPStyle1 = "A";
    var myPStyle2 = "B";
    //need to add 6 more styles here:
    //var myPStyle3 = "C";
    //var myPStyle4 = "D";
    //var myPStyle5 = "E";
    //var myPStyle6 = "F";
    //var myPStyle7 = "G";
    //var myPStyle8 = "H";
    //the last style not needed in script?
    // apply 1st style to 1st paragraph
    mySel.appliedParagraphStyle = myDoc.paragraphStyles.item (myPStyle1);
    // apply styles to paragraphs after selected
    //2nd style
    mySel.paragraphs[-1].insertionPoints[-1].appliedParagraphStyle = myDoc.paragraphStyles.item (myPStyle2);
    //next style
    mySel.paragraphs[-1].insertionPoints[-1].paragraphs[0].insertionPoints[-1].appliedParagrap hStyle = myDoc.paragraphStyles.item (myPStyle2).nextStyle;
    I've tried badly, but can't find the way to extend the sequence
    Sorry, no skills in scripting yet...
    all styles have 'Next Style' option activated, but I can't use 'Apply style, then Next style' or Object styles, because I need four different sequences of those para styles:
    A-B-C-D-E-F-G-H
    A-B-D-E-G-H
    A-C-D-F-G-H
    A-D-G-H
    and I really don't want to create special clones of the same style for each sequence (Keep It Simple, they say ).
    I believe it can be done via four slightly adjusted scripts...
    any suggestions would be greatly appreciated...

    Sorry about being late to the party, I usually pick up stuff like this right away.
    How about this one?
    1. No separate scripts needed, it uses a tiny dialog where you can choose what style set to use. If I'm correct, you can press a number key on Windows to immediately select one of the items.
    2. It works down from the paragraph your cursor is in. It has nothing to do with text frames, though -- consecutive paragraphs inside a story always ignore any text frames.
    3. Extensible: you can easily change the names of the styles in the top array, and the number of style groups in the list.
    var styleLists = [
              [ "A", "B", "C", "D", "E", "F", "G", "H" ],
              [ "A", "B", "D", "E", "G", "H" ],
              [ "A", "C", "D", "F", "G", "H" ],
              [ "A", "D", "G", "H" ]
    var radiobutts = [];
    styleDialog = app.dialogs.add ({name:"Set Multiple Styles",canCancel:true});
    with (styleDialog)
              with (dialogColumns.add())
                        with (radiobuttonGroups.add())
                                  for (i=0; i<styleLists.length; i++)
                                            // Build radio button string
                                            str = "&"+String (i+1)+". ";
                                            for (j=0; j<styleLists[i].length; j++)
                                                      if (j) str += "-";
                                                      str += styleLists[i][j];
                                            radiobutts.push (radiobuttonControls.add({staticLabel:str, checkedState:false}) );
    radiobutts[0].checkedState = true;
    if (styleDialog.show())
              for (i=0; i<radiobutts.length; i++)
                        if (radiobutts[i].checkedState == true)
                                  break;
              if (i < radiobutts.length)
                        par = app.selection[0].paragraphs[0];
                        for (j=0; j<styleLists[i].length; j++)
                                  par.appliedParagraphStyle = styleLists[i][j];
                                  par = par.parentStory.paragraphs.nextItem(par);

  • Exporting video holds on the second 'clip', but audio exports correctly

    i'm exporting a project from imovie, i have a number of clips in there (which was originally a single video, but split up) and an audio track. when i first exported it as 'web', it worked fine, but when i tried to increase the quality settings via exporting to quicktime, it exports video up until the end of the first clip, and then just holds on that frame until the end of the video. the length is correct, and the audio exports correctly, but the video is just still.
    any thoughts?

    EmmaBean
    What version of Premiere Elements and on what computer operating system is it running? Have you created the narration in Premiere Elements
    using the Narration Tool? Do you have the problem in the export if you move the narration clip to one of the numbered Audio Tracks before export?
    Are you using the SmartFix feature in this project? If so, have you checked your background foreground settings?
    But, before that, is the sound on all the audio tracks OK when evaluated in the Edit area? Is the sound a problem only in the export?
    If you are having sound problems in the Edit area before export, are you adjusting the volume while viewing the Audio Meters
    typically found under Window Menu/Audio Meters.
    Let us start here and then decide what next.
    Any questions, please do not hesitate to ask.
    Thank you.
    ATR

  • Change medium (e.g. A4,...) via scripting

    Hi all,
    is it possible to change the medium (e.g. A4, A4color,...) of a form-output via scripting (initialisation) in the LifeCycle Designer?
    Thanks a lot.
    Regards Marc

    Hi Neelima,
    I tried implementing the same in the Save Badi. Still no success.
    I guess this is standard bug, I deactivated all my badi implementation and test the standard feature.
    I went to the Output tab, by default it was Email and I changed it to XML in the screen.
    when i save the PO document . it saved.
    But , we opened it again in display or edit mode.  It is again defaulted to EMAIL .
    Just an information :
    Note 1072367 - No output medium identified error even if medium selected.
    This note is released with manual correction for SRM_SERVER Ver 6 and say
    this is has been included in the SRM_SERVER 7 version.
    This piece of correction is not available in our system.
    I guess this  might be a standard bug ? Please suggest me .
    Best regards,
    Prabhu

Maybe you are looking for

  • COPA- Customer Grp 2 to be retreived from Sold to part  in COPA document.

    Hi friends, The requirement is to retrive Customer grp 2 from sold to part not from ship to part  in COPA document if the sold to party is different from ship to party. For example : We have one customer/ payer/sold to party is  10000 and customer gr

  • Why is "Album Artwork Not Modifiable" ?

    I've seen this problem with certain MP3 files. However, this is now happening with some other songs that are AAC format. Can someone help me? Thanks!

  • Help!!!! com.apple.WebKit.Pluginprocess problem in safari

    Hi im using Safari 5.1.5 on OSX..I have not upgraded as I use Quark 6 and Lion will destroy this!!! com.apple.WebKit.Pluginprocess is pausing safari every 2 mins for at least 3 minutes..impossible to work..have to keep restarting PLEASE SOMEONE HELP

  • Dll collision with nimxprxu.dll

    I am having trouble with the national instrument drivers. I am programming in C++ and have 3 National instrument cards installed on my system, a PCICAN bus card and 2 PCI-6110 boards. I have several other DLLS that are being relocated "due to collisi

  • Can wi fi be disabled for minor??

    My 11 yr old son has saved money for a new ipod, now he wants the ipod touch, but I won't let him get it if it will give him internet access. He wants it for the large screen format mostly. Advise??