Skip to main content
Lara_seven
Known Participant
March 11, 2019
Question

batch processer for the CTLP to Tiff conversion

  • March 11, 2019
  • 1 reply
  • 319 views

Dear Friends

I need batch processer for the CTLP to Tiff conversion Script. I got one script from the Esko but is working in individual images but I want to create a bunch of CTLP image in one folder. It needs to convert.

Below script for your reference.

/**

* Sample scripts are provided as-is with no warranty of fitness for a particular purpose.

* These scripts are solely intended to demonstrate techniques for accomplishing common tasks.

* Additional script logic and error-handling may need to be added to achieve the desired results in your specific environment.

*

* It is up to the user to verify that his intended use of the offered automation functionality is compliant with any third party license agreement and/or other restrictions applicable to any non-Esko products.

*/

inputs = ["~/Desktop/ctlp/Bear_Transparency_CT.ct"]

outputFolder = "~/Desktop"

for (i=0;i<inputs.length;i++)

{

    var fileRef = new File(inputs);

    openctlp(fileRef);

    docRef = app.activeDocument;

    outputFile = new File(outputFolder + "/"+ fileRef.name);

    var TiffSaveOptions = new TiffSaveOptions();

    TiffSaveOptions.transparency = true;

    TiffSaveOptions.embedColorProfile = true;

    docRef.saveAs(outputFile, TiffSaveOptions, true, Extension.LOWERCASE);

    docRef.close(SaveOptions.DONOTSAVECHANGES);

}

function openctlp()

{

var idOpn = charIDToTypeID( "Opn " );

    var desc35 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

    desc35.putPath( idnull, fileRef );

    var idAs = charIDToTypeID( "As  " );

        var desc36 = new ActionDescriptor();

        var idktra = charIDToTypeID( "ktra" );

        desc36.putBoolean( idktra, true );

        var idkgrd = charIDToTypeID( "kgrd" );

        desc36.putBoolean( idkgrd, false );

        var idisol = charIDToTypeID( "isol" );

        desc36.putInteger( idisol, 0 );

    var idEskoEskoCTLPFormat = stringIDToTypeID( "Esko Esko CT/LP Format" );

    desc35.putObject( idAs, idEskoEskoCTLPFormat, desc36 );

executeAction( idOpn, desc35, DialogModes.NO );

}

This topic has been closed for replies.

1 reply

pixxxelschubser
Community Expert
Community Expert
March 11, 2019

Are you sure that this really is an illustrator script?

IMO this is more like Photoshops AM-Code.