Copy link to clipboard
Copied
Just what the description says. I've tried about 20 different variants i found on this forum but none are working. Please help. Thank you.
function addTextF(doc, layer, name){
app.generalPreferences.preventSelectingLockedItems= false;
var myBlendingSettings = { blendMode : BlendMode.NORMAL };
var myTransparencySettings = { blendingSettings : myBlendingSettings };
var tFR = doc.textFrames.itemByName(name);
if(tFR && tFR.isValid) {
tFR.remove();
}
var origUnit = app.scriptPreferences.measurementUnit;
app.scriptPreferences.measurementUnit = MeasurementUnits.INCHES;
tFR = doc.textFrames.add(layer, LocationOptions.UNKNOWN, {name: name, fillColor :"Paper", fillTint: 100, transparencySettings : myTransparencySettings, geometricBounds: ['.504in','.21in','.376in','-.21in'] });
tFR.rotationAngle += -90;
tFR.fit (FitOptions.FILL_PROPORTIONAL);
tFR.locked=true;
app.scriptPreferences.measurementUnit = origUnit;
return tFR;
}
Copy link to clipboard
Copied
see this please..
Copy link to clipboard
Copied
Thank you. This will work for text "If the frame is selected". In the box i created above i will be adding a barcode. And i want it to fit the barcode/picture "Not Text" proportionately in that box as soon as i place it there.