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

Printing book/lab spot colors 'Not Implemented' error

Contributor ,
Nov 03, 2015 Nov 03, 2015

Hello everyone, back again haha, same script.

Every once in a while I would get a non implemented error when I tried to print. I was able to narrow it down to exactly what was causing the problem, the spots from the pantone solid coated library. These spots are book/lab color-mode as opposed to cmyk. When I convert them to cmyk, the script would work without an error. 

Technically the line that has the error is line 35 when it is printed, but from further trial and error I found out what is really causing it is when I try to give the new separation options an ink list in line 27. This will work when the spots are all cmyk, and it will have that 'non implemented' error when there is a spot with a lab color. Here is a snippet of the problem.

docRef = app.activeDocument;

app.coordinateSystem = CoordinateSystem.ARTBOARDCOORDINATESYSTEM;

 

printPostScript(); 

 

function printPostScript() { 

   

     

    app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS; 

           

   var jobOpts = new PrintJobOptions();

  

   var opts = new PrintOptions();

     

    opts.jobOptions =  jobOpts; 

  

   opts.PPDName = 'AdobePdf';

   

   opts.printerName= 'Adobe PostScript File';

  

   var sepOpts = new PrintColorSeparationOptions();

  

   sepOpts.colorSeparationMode = PrintColorSeparationMode.HOSTBASEDSEPARATION;

//here is the error

   sepOpts.inkList = docRef.inkList;

  

   opts.colorSeparationOptions = sepOpts;

  

 

docPath3 = decodeURI( '~/Desktop/comps/' + 'dud' + '.ps' ); 

   

         jobOpts.file = File( docPath3 ); 

 

        app.activeDocument.print( opts ); 

       

        };

So yea, not sure why that is happening. I am able to print lab spot colors fine through ui , not sure why the error is there, do I need to convert them through script somehow? or is there some kind of setting that would fix this?

Thanks in advance!

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

correct answers 1 Correct answer

Valorous Hero , Nov 04, 2015 Nov 04, 2015

Yes, there sure is!
Use app.convertSampleColor() <-- the destination parameter is actually required for this to not fail, so use undefined in parameters that you don't care about remembering or writing.
It will return an array of numbers, which you are free to use how you see fit.

I made my own function to wrap it for an added level of convenience:

function convertAppColor(src,dest,clrArr){

    return app.convertSampleColor(ImageColorSpace[src], clrArr, ImageColorSpace[dest], ColorConvertPurpose.defa

...
Translate
Adobe
Valorous Hero ,
Nov 03, 2015 Nov 03, 2015

This is a head-scratcher.

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

Yea I can't find out why the script doesn't like the lab colors because it has no problem when I do it manually. I guess the next step is to figure out if it's possible to change a spot color from lab to cmyk via script. It is easy to do manually, you just double click on the swatch and the color mode drop down is right there.

var docRef = app.activeDocument;

for (i = 0; i < docRef.swatches.length; i++) {

  

    if (docRef.swatches.color == '[SpotColor]') {

if (docRef.swatches.color.spot.colorType == ColorModel.SPOT && docRef.swatches.color.spot.spotKind == SpotColorKind.SPOTLAB) {

docRef.swatches.color.spot.spotKind = SpotColorKind.SPOTCMYK;

  

    }

}

}

This won't work of course haha. Does anyone know if this is possible?

Thanks everyone!

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

I think you've also got to assign the color values, because CMYK needs 4 color values, but the one you've got in the spot only has 3.

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

Ah, ok you have to give it values. So I take it there is no way to auto convert colors like you can through UI?

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

Yes, there sure is!
Use app.convertSampleColor() <-- the destination parameter is actually required for this to not fail, so use undefined in parameters that you don't care about remembering or writing.
It will return an array of numbers, which you are free to use how you see fit.

I made my own function to wrap it for an added level of convenience:

function convertAppColor(src,dest,clrArr){

    return app.convertSampleColor(ImageColorSpace[src], clrArr, ImageColorSpace[dest], ColorConvertPurpose.defaultpurpose);

}

So a typical use would be:
var myColorArr = convertAppColor("LAB","CMYK", mySpot.getInternalColor());

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

Awesome, seems to work well.

var docRef = app.activeDocument;

function convertAppColor(src,dest,clrArr){

    return app.convertSampleColor(ImageColorSpace[src], clrArr, ImageColorSpace[dest], ColorConvertPurpose.defaultpurpose);

}

var mySpot = docRef.spots.getByName ('PANTONE Yellow 012 C');

var myColorArr = convertAppColor("LAB","CMYK", mySpot.getInternalColor());

newCMYKColor = new CMYKColor();

newCMYKColor.black = myColorArr[3];

newCMYKColor.cyan = myColorArr[0]

newCMYKColor.magenta = myColorArr[1];

newCMYKColor.yellow = myColorArr[2];

mySpot.color = newCMYKColor;

Looks like this will solve that problem. Thank you so much!

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

Okay good, and I was totally just kidding about using undefined parameters for this, as it's one where those parameters previous to the destination are quite required. I was just cross-remembering another function, ooopse.

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

haha no problem. Thanks again!

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

Oh yea, so, not really an issue, unless it is.. but you know, I am not sure if the PANTONE CMYK values as defined by the book makers are going to be the same as the ones produced by this app color conversion.

What am I talking about, you're doing separations! Duh, I forgot what this was all about in the first place!

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

haha yea sometimes we switch orders to heat press transfers though so that is good to know. I think our printer profiles have their own values they assign to pms colors so it should be good.

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