Hi guys,
I've recently found a script which will help my workflow tremendously if i can adjust it properly. I make obituaries for a living, which need a simple 1 pt black border around the whole page. I would like to have a script which adds this for me.
Currently I have this:
var myDoc = app.activeDocument;
myDoc.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;
var currentPage = myDoc.layoutWindows[0].activePage;
var myLayer = app.activeDocument.layers.item("QR");
if(!myLayer.isValid)
{
myLayer = app.activeDocument.layers.add ({name: "kader"});
}
myLayer.layerColor = UIColors.GRASS_GREEN;
myLayer.move(LocationOptions.AT_BEGINNING); // üste tasi
var myFrame = currentPage.rectangles.add ({geometricBounds:[0,0,85,200]});
myFrame.contentType = ContentType.GRAPHIC_TYPE;
myFrame.appliedObjectStyle = krkod;
myFrame.frameFittingOptions.autoFit = true;
myFrame.itemLayer = myLayer;
But this script doesn't take in account the varying size of the page. It only places it at the top left corner. Is there a way to make it that it will fit neatly around my whole page?
Also, it would be perfect if it would add the black border by it self. Can someone help me with this?
Kind regards!