Reply To: Javascript select image from specific layer

Home Page / Forums / General InDesign Topics (CLOSED) / Javascript select image from specific layer / Reply To: Javascript select image from specific layer

#14338891


if ( items.itemLayer.name == “specific layer name” ) {
try {
fileName = File(items.graphics[0].itemLink.filePath).name;
fileName = fileName.replace(/\.[a-z]{2,4}$/i, “.jpg”);
} catch (e) {};
app.jpegExportPreferences.exportResolution = 200;
app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.HIGH;
//give it a unique name
var myFile = new File( myPath + “/” + fileName );
items.graphics[0].exportFile( ExportFormat.JPG, myFile );
}

(^/) The Jedi

This article was last modified on April 26, 2021

Comments (0)

Loading comments...