/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* @@@BUILDINFO@@@ "removeBorder.jsx" 1.0.0 5-6-2010 */ var myDocument = app.documents.item(0); main(); function main(){ if(app.documents.length != 0){ if(app.documents.item(0).rectangles.length != 0){ removeBorder(); } else{ alert("Document contains no graphics."); } } else{ alert("Please open a document and try again."); } } function removeBorder(){ var myBoxes = myDocument.rectangles; var myText = myDocument.textFrames; for(var i = myBoxes.length-1; i >= 0; i--){ myBoxes.item(i).strokeWeight = 0; //this crazy number below really just means Center Content myBoxes.item(i).fit(1667591779); } for(var i = myText.length-1; i >= 0; i--){ myText.item(i).strokeWeight = 0; } }