Copy link to clipboard
Copied
Is there a way to keep a text frame .5" away from the bottom of the page? I currently have a script that can do this however you have to alter it for every page size. We use tons of different page sizes and it would be way easier if the script could determine all this for me and automatically place it at the bottom.
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>CREATE TEXT FRAME FOR SAVE INFO<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\\
function addTextFrame(doc, layer, name){
var myBlendingSettings = { blendMode : BlendMode.OVERLAY };
var myTransparencySettings = { blendingSettings : myBlendingSettings };
var tf = doc.textFrames.itemByName(name);
if(tf && tf.isValid) {
tf.remove();
}
var origUnit = app.scriptPreferences.measurementUnit;
app.scriptPreferences.measurementUnit = MeasurementUnits.INCHES;
tf = doc.textFrames.add(layer, LocationOptions.UNKNOWN, {name: name, fillColor :"Yellow", fillTint: 20, transparencySettings : myTransparencySettings,
geometricBounds: ['12.55','0','11.5','4.5'] });
app.scriptPreferences.measurementUnit = origUnit;
return tf;
}
Try the following
...function addTextFrame(doc, layer, name){
var myBlendingSettings = { blendMode : BlendMode.OVERLAY };
var myTransparencySettings = { blendingSettings : myBlendingSettings };
var tf = doc.textFrames.itemByName(name);
if(tf && tf.isValid) {
tf.remove();
}
var origUnit = app.scriptPreferences.measurementUnit;
app.scriptPreferences.measurementUnit = MeasurementU
Copy link to clipboard
Copied
Try the following
function addTextFrame(doc, layer, name){
var myBlendingSettings = { blendMode : BlendMode.OVERLAY };
var myTransparencySettings = { blendingSettings : myBlendingSettings };
var tf = doc.textFrames.itemByName(name);
if(tf && tf.isValid) {
tf.remove();
}
var origUnit = app.scriptPreferences.measurementUnit;
app.scriptPreferences.measurementUnit = MeasurementUnits.INCHES;
tf = doc.textFrames.add(layer, LocationOptions.UNKNOWN, {name: name, fillColor :"Yellow", fillTint: 20, transparencySettings : myTransparencySettings});
tf.geometricBounds = [doc.pages[0].bounds[2] + .5, 0, doc.pages[0].bounds[2] + 1.55, 4.5]
app.scriptPreferences.measurementUnit = origUnit;
return tf;
}
-Manan
Copy link to clipboard
Copied
Thank you very much. This is is perfect.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now