• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can i get this frame to FIll Proportional?

Advocate ,
Feb 23, 2017 Feb 23, 2017

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; 

             

    } 

TOPICS
Scripting

Views

234

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 23, 2017 Feb 23, 2017

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 24, 2017 Feb 24, 2017

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines