Document Spot color

Hi All,
I require a script to find if there is any spot color used in my indesin document.
Can anyone please provide me the code.
Regards,
Chang

Hi,
Checking applied color must be scan all objects!! of the document,
Here is a code, it scans texts and frame objects(Text Frame, Rectangle,,,,)
but not support table and cell.
mg
Thanks
var doc = app.activeDocument;
var mySwatch = doc.colors;
var flag = 0;
for (var i=0; i < mySwatch.length; i++){
    if (mySwatch[i].model == ColorModel.SPOT){
       flag += 1;
if ( flag > 1 ){
    check_spot(doc);
else{
     alert("no spot color");
function check_spot (doc) {
     // scan text story exclude table and cell
     var flg2 = flg3 = flg4 = flg5 = 0
     var story_obj = doc.stories;
     for (var sti=0, stiL=story_obj.length; sti < stiL ; sti++) {
          var tsr_obj = story_obj[sti].textStyleRanges;
          for (var tsi=0, tsiL=tsr_obj.length; tsi < tsiL ; tsi++) {
               try{
                    if (tsr_obj[tsi].fillColor.model == ColorModel.SPOT) {
                         flg2 += 1;               
               }catch(e){$.writeln(e);}
               try{
                    if (tsr_obj[tsi].strokeColor.model == ColorModel.SPOT) {
                         flg3 += 1;               
               }catch(e){$.writeln(e);}
     // scan pageitem
     var all_p_item = doc.allPageItems;
     for (var api=0, apiL=all_p_item.length; api < apiL ; api++) {
          try{
               if (all_p_item[api].fillColor.model == ColorModel.SPOT) {
                    flg4 += 1;
          }catch(e){$.writeln(e);}
          try{
               if (all_p_item[api].strokeColor.model == ColorModel.SPOT) {
                    flg5 += 1;               
          }catch(e){$.writeln(e);}
     // result message
     if ( flg2 > 0 || flg3 > 0 || flg4 > 0 || flg5 > 0 ) {
          var tx_fill_color   = flg2 > 0 ? "used spotcolor in text fill " + flg2 + "part" : "";
          var tx_stroke_color = flg3 > 0 ? "used spotcolor in text stroke " + flg3 + "part" : "";
          var pi_fill_color   = flg4 > 0 ? "used spotcolor in page item fill " + flg4 + "part" : "";
          var pi_stroke_color = flg5 > 0 ? "used spotcolor in page item stroke " + flg5 + "part" : "";
          var rslt = [tx_fill_color, tx_stroke_color, pi_fill_color, pi_stroke_color].join('\n')
          alert("result\n" + rslt);

Similar Messages

  • How to make preflight profile witch find out if exist in document spot color with name "CutContour", if not show allert,  I try many combinations but nothing works

    How to make preflight profile witch find out if exist in document spot color with name "CutContour", if not show allert,  I try many combinations but nothing works

    Thanks very much for your help, but I'm still overlooking something. I double checked to make sure that I did not have a hidden .txt file extention. I then decided to abandon the lock on preferences idea until I get it working. I converted my mozilla.cfg file back to plain text. I made sure I do not have an extra blank line at the end of each file. The syntax looks good, as far as I can tell. I'll copy and paste what I have so far. Did I have the file locations correct posted above? Also, if you feel i can delete some lines of text in my mozilla.cfg file I'll be happy to do so.
    mozilla.cfg
    <pre><nowiki>//
    pref("privacy.sanitize.sanitizeOnShutdown", true);
    pref("privacy.sanitize.promptOnSanitize", false);
    pref("browser.rights.override", true);
    pref(“app.update.auto”, false);
    pref(“extensions.blocklist.enabled”, false);
    pref(“extensions.shownselectionUI”, true);
    pref(“browser.shell.checkDefaultBrowser”, false);
    pref(“toolkit.telemetry.enabled”, false);
    pref(“toolkit.telemetry.prompted”, 2);
    pref(“toolkit.telemetry.rejected”, true);
    pref(“app.update.auto”, false);
    pref(“browser.download.useDownloadDir”, true);
    pref(“browser.search.update”, false);
    pref(“signon.autofillForms”, false);
    pref(“signon.rememberSignons”, false);
    pref(“browser.download.manager.scanWhenDone”, true);
    pref(“browser.formfill.enable”, false);
    pref(“xpinstall.enabled”, true);</nowiki></pre>
    channel-prefs.js
    pref("app.update.channel", "release");
    override.ini
    [XRE]
    EnableProfileMigrator=false
    all-lmc.js
    pref("general.config.filename", "mozilla.cfg");
    defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=http://bbc.co.uk");
    Again, thank you very much for your time. Do I create my own browserconfig.properties, and firefox.js? Also, I forgot to mention I'm running Windows 8.

  • Adobe Acrobat 9 Pro is showing CMYK in spot color document

    Hi,
    I created a PDF using Adobe Illustrator CS4, and although I am only using 2 spot colors, both, Illustrator and Acrobat are showing CMYK plates in the Separations Preview and Output Preview. When I turn off the Spot plates, there is nothing in the document. Could you please help me figure out why is this happenning?
    Thanks

    Acrobat will always show the CMYK framework - even if there's no CMYK in there. You'll also notice that if the file contained RGB, calRGB, LAB etc - it also shows in the Output Preview as CMYK since it's in simulation mode (enough of that for now)!
    You might want to use the SHOW feature in Output Preview or even use a preflight profile to double check ...
    Cheers,
    Jon

  • Adobe Illustrator is showing CMYK in spot color document

    Hi,
    I created a PDF using Adobe Illustrator CS4, and although I am only using 2 spot colors, both, Illustrator and Acrobat are showing CMYK plates in the Separations Preview and Output Preview. When I turn off the Spot plates, there is nothing in the document. Could you please help me figure out why is this happenning?
    Thanks

    Every file has CMYK plates in Illustrator or Acrobat. I think you are over-thinking things.
    The important issue is:
    Are there any items actually on the plates??
    Just because there are plates, does not mean those plates contain artwork. Both Illustrator and Acrobat Pro will always indicate CMYK plates, but if there is no CMYK data, they won't print.

  • Is there a way to convert a Word document with Red and Black into Spot colors in Acrobat X?

    Customer sent us PDF files created in MS Word. Of course, Word creates CMYK versions of colors. I need the red text and black text converted into spot colors for 2 color output on press. Is there a way to do this? I saw another thread that said there is a Fixup in the Print Production/Preflight section of Acrobat X that has a convert to Spot, but I'm not seeing that. All I see is Convert to CMYK. I'm using Acrobat X 10.1.13 on OS X. Any help would be appreciated. He also sent the Word docs so I can drop that into InDesign and reformat the whole thing and fix the colors myself but if I can do it in Acrobat, that would be a lot quicker. Thanks!

    Frequently in this scenario the red will be 100% of either magenta or yellow with 0% black. In these cases you can merely plate the Black & Magenta (or yellow) for press.
    I've created a Preflight Fixup on occasion for these also.
    An example shown - Note it requires the document is cmyk. MS Files will be rgb. You could create a Preflight looking for rgb colors.
    With Fixup tab selected - Options > Create New Fixup > Type of Fixup - search for Spot in the field

  • Spot color infomation not shown in Document info objects

    Hi,
    In the eps file, I have checked the Document info-->Objects menu in that spot color mentioned as "NONE"(refer img1.jpg). But in the same eps file Document info-->"Spot color Objects" menu its shows E(CMYK)(refer img2.jpg) that is spot color name. Could you please advise me why this difference occurs. Also I need to get this spot color object name via javascript, how to get this infomation?. I have attached the screen shot for your references.
    Thanks for looking into this,
    Maria prabudass

    Hi.
    TextFrame color informations included under textPath property.
    app.activeDocument.selection[0].textPath.fillColor.gradient.gradientStops[0].color.spot.na me
    If your selection is textFrames, add "textPath" after "selection[0]".
    Ten.

  • Converting from a spot color to a color for a RGB document?

    How can I take a spot color from the Pantone Swatches Library and convert it for use in a RGB document? Thanks.

    kat,
    You may:
    1) Click the Pantone Swatch, or a path to which it is applied;
    2) Switch to RGB (for RGB, CMYK for CMYK) in the Color palette/panel, and ;
    3) Click New Swatch in the Swatches palette/panel flyout, see that Color Type says Process Color, give it its name (and make it Global if relevant), and press OK.
    With that you will have the corresponding RGB colour (closest match) as a swatch.

  • Convert PDF Document to PDF with Spot Color

    I want to convert a regular PDF document with RGB/CMYK color profile to one with Spot color. Can this be done using Acrobat X Pro, if so How?

    Hi Steve
    I am still working on the process to automate the conversion of PDF file with RGB color profile to Spot.
    I am nearly there, here is the method...
    1. Have a prefight profile with the spot color fixes. For now I put in 10 colors.
    2. Wrote a Javascript that will invoke the preflight profile
    3. Cretated an application (AutoSpotFix) in VC++ and Acrobat SDK that will open the document and assign the javascript function to 'WillSave' document action. The AutoSpotFix will then trigger the save on the document.
    Java script had to be involved because SDK cannot invoke the preflight profile.
    Now my problem is the document can contain any spot color, I need to
    a) Either put in the thousands of spot color into my preflight profile, which will take days to do. Or I can create a preflight profile file (*.kfp) and load it, which is an XML file.
    b) Dynamically load the preflight profile file with the few current colors, for which I need to dynamically create the preflifgt profile.
    Either way I have to create the *.kfp file, Is there a way to create the Preflight profile file?

  • Spot color used in indesign document

    Hi all,
    How to find spot color used (text, frame and any othe item) in Indesign document.
    Please help me to write javascript code.
    thanks,
    mon

    'unusedSwatches' -- sure. Removing these will leave just the used ones (something like that was asked a while ago). But it seems the OP wants to know where the remaining ones are in use.
    Graphic objects can be tested per Loic's script, but each and every single table cell fill and stroke needs to be checked, and for text I can't think of anything else than explicitly searching for fill & stroke.
    The OP needs to 'find' spot color usages, which is rather unclear in the context of a script. Find it -- and then what? Report? Highlight/select? (Which doesn't work when more than a single occurence is found.) Change to another color?

  • Changing to a spot color in a logo placed in an indesign document

    Creating a docement in ID where I have placed a logo created in AI. is it possible to make the logo color a spot color in ID?  I am using CS6 in creative clous on a PC running windows XP.

    Why not change it in Illustrator?
    Since you're using Creative Cloud you should be aware that the new
    applications will not install on Windows XP. The minimum configuration
    is Windows 7 SP1 or Windows 8.
    Bob

  • Hey guys, I am new to javascript and I am trying to figure out how to add two spot colors to the active document. I am trying to get it to detect weather or not the spot colors are already in the document, and if they are not, it will proceed to create th

    Here's what I have so far.
    var docRef = app.activeDocument;
    if (docRef.swatches.getByName ("CutContour") === 'undefined') {
    var spotNameCC = "CutContour";               
    var cmykColor = new CMYKColor();
    cmykColor.cyan = 0;
    cmykColor.magenta = 100;
    cmykColor.yellow = 0;
    cmykColor.black = 0;
    // Create Spot
    var spot = docRef.spots.add();
    spot.color = cmykColor;
    spot.colorType = ColorModel.SPOT;
    spot.name = spotNameCC;
    //var spotNameW = "WEED (r)";
    // Create CMYKColor
    /*var cmykColor2 = new CMYKColor();
    cmykColor2.cyan = 50;
    cmykColor2.magenta = 0;
    cmykColor2.yellow = 50;
    cmykColor2.black = 0;
    // Create Spot
    var spot2 = docRef.spots.add();
    spot2.color = cmykColor2;
    spot2.colorType = ColorModel.SPOT;
    spot2.name = spotNameW;
    Let me know what I did wrong lol I know it has to do with the detecting part. Also, if anyone knows any good websites to learn javascript I would be very thankful. I am not sure what a lot of the syntax means. Thanks!!

    Never mind I figured it out. Someone posted a similar question a few months ago on here, damn this forum is awesome wish I had known about it sooner. Sorry if I wasted anyone's time.

  • CMYK layers showing up when spot color illos placed in InDesign CS3

    When I place an Illustrator CS3 (13.0.2) illustration into InDesign CS3 (5.0.3), Preflight tells me that CMYK colors are being used, even though the imported illustration has only 2 Pantone spot colors matching those used in the InDesign document (the 2 spot colors show up in Preflight as well). I double-checked to make sure they were spot colors, not CMYK. When I go to Separations Preview, my 2 spot color show up but nothing shows on the CMYK layers. I deleted all unused color swatches in my InDesign file (and the Illustrator file), and when I delete the illustration Preflight just shows the 2 PMS spot color that I'm using in the document. I'm using Mac OS 10.5.4 on a brand-new Quad-Core Xeon, if that matters.
    I've tried saving the illustration as both AI and EPS, and using CMYK and RGB color modes. I deleted all unused color swatches from both Illustrator and InDesign. For another test, I created a fresh Illustrator file that just had a box in 1 spot color and placed it in a fresh InDesign file, and again Preflight said that CMYK was being used. Besides the usual work-around of telling my service bureau to not output the CMYK film, does anyone have any idea of how to correct this? I've encountered it several times. (BTW, my service bureau didn't know what the problem is).
    This is my first visit and post here, so if I have violated some forum etiquette, please forgive me.
    James

    Save a PDF and place that.
    Bob

  • Can I have "All spots to process" checked at all times, even for new spot colors?

    When I check “All spots to process” in the pdf export settings and save my settings the settings remember that I've checked this option. But, if new spot color objects using new spot color swatches are added to the document (or another document) and I go into the pdf export settings the check mark has been changed into a dash (with the actual checkbox highlighted) – signifying that only some of of the spot colors will be changed to process colors during export. I absolutely fail to see how this could possibly be seen as a feature and not a bug … if the user has checked “ALL spots to process” wouldn't the user expect ALL spots to be converted to process colors, rather than just any spot colors that happened to be in the document that happened to be open when the user first checked that checkbox and saved that setting?
    Am I missing something here? What's the point of even having that checkbox as part of your saved export settings if it doesn't include any other spot colors than those used when saving the settings?
    What's the point of having settings if you can't trust them, and still need to manually "override" them every time?
    I see that some users have taken to writing scripts that instead turn all spot colors in the swatch panel to process colors, and while I commend them for creating that workaround, I'm still pissed at Adobe for not getting the function right.
    If this is a feature, who is it for? People who want to add just certain spot colors and turn those into process colors rather than turning all spot colors into process colors are surely better off doing that in the swatches panel, where they're in total control of what's what. And if they don't want to "permanently" change their spot colors to process colors, and prefer to (temporarily) convert them during exporting/printing only, they can do that in the ink manager. But when someone checks convert "All spots to process" couldn't we safely assume they really want ALL spot colors to be converted and not just some of them? I mean, the way that checkbox behaves now, it's like it's a button and not a checkbox. As in: hit the button "All spots to process" to switch all currently viewed spot colors to process colors in the ink manager, OR check the "All spots to process" checkbox to always convert ALL spot colors to process colors during exporting/printing.
    Anyone got any light to shed on this?
    And is there a way to actually get the advertised behavior, because if you have to run a script every time you export/print you might as well just manually select the checkbox every time instead, but either way it's just really unnecessary as far as I'm concerned … Adobe should get the feature right instead.
    If you save a setting and recall it, it shouldn't be possible for that setting to change into something else (in this case changing a checkmark to a dash).
    Clearly CMYK printing is the norm, so for most users it would make a lot of sense to have the "All spots to process" checked most of the time, and then you just go into the swatches panel or the ink manager and set things correctly for those print jobs that really do need spot colors.
    I myself am not one of those who add spot colors to my swatches unless I'm really using them as spot colors, but I often work with magazines and folders featuring adverts made by whoever, and typically there's always at least one advert that features spot colors, and therefore it would be very nice if the "All spots to process" feature actually worked as advertised without any required actions from me.
    We stopped sending ads back to the advertisers for adjustments a long time ago, unless we absolutely had to, because there were so many things wrong with so many ads that it was simply too much work to write back and explain everything to people who most of the time didn't even understand what we were talking about. We found that it was usually a LOT faster and easier to just adapt the ads ourselves, as long as it was something that could be worked out really quickly from within InDesign itself, which pretty much included most typical errors.
    But with this feature I find Adobe is trying to make my job harder rather than easier, and it's pissing me off. Arrrghh… ;-)

    But It's not a preference it's a shortcut
    It's a bad joke, is what it is. ;-)
    So, why in your opinion should it be presented the way it is? I keep saying in it's current functionality it shouldn't be presented the way it is (and that: if it is, it shouldn't work the way it does). If it's not a preference or even a proper checkbox, why present it that way?
    If you put it right next to the table at the top of the window (so that it's directly associated with that information, rather than information right above it) and just called the checkbox “Spot(s) to process” and had it only visually reflect the content of the sleected spot colors in the table, then I'd see your point with likening it to the “Hyphenate” checkbox.
    If a story has two selected paragraphs that uses two different hyphenation settings then the checkbox should present the way it does now, but if you hit the checkbox so that both paragraphs now use hyphenation and create a third paragraph inbetween the two previous ones it better inherit that setting and not turn off hyphenation for the new paragraph (unless of course there's a defined next paragraph style that switches to a style with hyphenation turned off). And if that checkbox said “Hyphenate all paragraphs” instead, then I would expect it to do just that, and not just the selected ones, and not just the current paragraphs but quite literally all paragraphs even newly created ones – otherwise it doesn't do what it says it does, and simply shouldn't be labeled that way.
    And seriously bad interface design aside, you'd have to rename “All spots to process” to “Switch all currently displayed spot swatches listed in the table above to process” to actually describe what that checkbox does. So even if you're a fan of the current functionality, as opposed to one that actually lets the user set and forget a setting like that, and think it's better that users manually check it repeatedly (which I'm not saying that you are, but you're not giving me any feedback suggesting you even see my point of view with any of this, so what do I know?), then why wouldn't you still support an interface that visually matches/signals that functionality better? If it's a “Select all” checkbox supplementing a table containing a column of checkboxes, then present it that way. Don't put it at the bottom of the window next to another checkbox that works just like a regular checkbox and label it “All spots to process” – because that way you are signalling a different behavior.
    Seriously, if I was to do design using the same mentality that Adobe uses when designing their user interfaces it wouldn't be long before I lost all clients. There's a lot to be said for de facto monopolies, I suppose. Oh no, there's nothing wrong with the design, just as long as you accept it on it's own terms and don't compare it to anything relevant, and just as long as you give people enough time to understand and accept it … and surrender to it.
    For real … I wouldn't win one single pitch that way.
    Today's threads have in many ways been a thorough reminder of the following quote from the second link I provided:
    Is there an Internet rule yet stating that even the most obviously indefensible mistake will eventually be defended by someone somewhere? Awful marketing efforts get explained as genius viral campaigns, broken features become solutions.
    And whether or not you're able to see my point of view or not is really besides the point too.
    The real point was, and remains to be:
    That for those who receive lots of ads or other external files that may or may not contain spot colors it would be far more useful to be able to set a checkbox to always convert all spots to process when exporting, than the current functionality is (and I'm not suggesting eliminating the current functionality, just change so it's presented like what it really is, and then just let that separate checkbox do what it says) … causing unnecessary manual action on the user's behalf shouldn't be the business of Adobe – preventing it should.
    And here's further reading on the subject of bad Adobe interface design for those who might feel so inclined. ;-)
    Cheers!

  • How can I place a transparent psd into Illustrator CS4 without effecting my spot colors?

    So, I'm very naive about printing processes and am working with an online book building company. I've asked them how I need to fix this, but don't expect great advice from their design team.
    When saving in Illustrator, I've been receiving the error:
    "When spot colors are used with transparency, changing them to process colors outside of illustrator can generate unexpected results."
    This effected the printing because it left a halo in the shape of the placed transparent .psd. So I need to know how to flatten the transparent psd or something in order to not have it effect the colors below it.
    Thanks!

    Thanks Monika and John. I've been working in Spot colors simply because my client has limited my palette for the screen printing we've been doing on ceramics in the past. Now we want this book to match the colors on the ceramics. But if Pantone bridge back to CMYK would work, I'll do it. I have been saving to PDF by making a combined pdf directly from the .ai folder. My links are all embedded.
    Is there a way to convert all the colors in the document to CMYK at once? Otherwise I'm looking at a very long week.

  • Should the print company I use be able to change a file to spot color for me?

    I recently sent a document in to a major print company to have a folder printed.  The document was created in Illustrator using only two colors. They said they could not print it because it was still more than two colors and that I needed to change it to a two color document using Pantone Spot Color.
    I've never had to do that for a print company before but I've also never had a two color project before. I opened the file back up and selected my objects and "recolored" the work and deleted all the swatches aside from the two colors I needed that were now Pantone Spot Color (HSB). It literally took me 2 minutes.
    The reason I am asking is because they pretty much said that I don't know what I'm doing, which to a designer is completely insulting.  We all do new things from time to time but that is an insult. Shouldn't they, a large print company with years of experience, know how to do this for me? They had the original design file.. Maybe they don't know what they are doing?
    Any clarity on as to why I needed to do it and not them is greatly appreciated.  Also.. any direction as the best way to use spot color over cmyk is appreciated too.

    ...which to a designer is completely insulting...
    What's so special about "a designer"?
    Prior to the mid 1980s, designers could get away with prima Donna attitudes, because they (or their employers) were paying pre-press "color houses" around $350 per hour to tweak colors to sooth their oh-so-erudite discernment and hyper-developed color sensitivities, and to gain reimbursement for the $100 per plate lunches on proof-check days.
    That all changed when designers (and their employers) got tired of paying those fees and took on the responsibility for the technical side of assembling their designs into something printable. That was the so-called "desktop revolution" and "revolution" was not a bad word for it. It turned a huge industry on its head. Color houses which didn't adopt PostScript devices and workflows were soon dropping like flies--and so were designers who didn't climb down off their lofty pedestals and buckle down to learning the technical realities of what they were doing.
    Don't be insulted, but the simple fact is, you still don't know what you're doing if you think converting any given process color job to a two-spot job is "just a couple of minutes' work." Only in the very simplest designs would it be as simple as re-defining a couple of process Swatches as spot color Swatches.
    In Illustrator in particular, doing so won't even work if the original Swatches were not originally defined as Global Swatches.
    If those two process Swatches were used in any Blends, converting them to spot will likely not update the intermediate steps of the Blend. In earlier versions of Illustrator, the same problem applied to grads.
    You can often get away with not having properly trapped the file with process swatches, because there are potentially four component inks which may be shared between adjacent different-color objects. Spot inks are not so forgiving. Trapping is essential if the two spot colors touch.
    So you really expect a printer to just have a policy to do that for you? And thereby bear responsibility for anything they may misinterpret or overlook that may cause a registration sliver on press and thereby loose every bit of profit on the printing (which these days is cut-throat competitive)?
    No. It's your responsibility to build the file correctly. The printing houses I use know better. They know I would have a coniption fit if I ever caught them modifying one of my files. They know they are to return any problem file to me for correction.
    JET

Maybe you are looking for

  • How to enable hardware virtualisation support?

    Today I upgraded to mac os x lion and when I open parallels desktop it asks me to enable hardware virtualisation support on my MacBook pro so that I can run windows xp as a virtual machine. I have searched the net and cannot find a way to access the

  • Error when launching flex App?

    ReferenceError: Error #1056: Cannot create property reserved on _index_mx_managers_SystemManager. What does this error mean? I have been debugging it for about a week now :)

  • HT204387 Can I pair android phone with iPad

    How can pair my android phone with my iPad  via Bluetooth ?

  • Segment in jsp

    hi all, i need segment management stuff. Did any one used segment in jsp in u r coding, if so send me the stuff. in my module i want to restrict the user to authorise 20/30 times only. for better understand.... my module flow goes like the following

  • Uploadig Item master

    Hi, I am trying to import via DTW the item master and I am having ther error Method''''of object """"failedoItems Can anyone help me Tks Adriana