Resize textFrame between margins


hi forum,

 

this script, add textframes specified location. request add textframe, within page marings, bottom of page. (margin may change according job size).

 

if (app.documents.length != 0){

   var mydocument = app.activedocument;

          viewpreference.rulerorigin = rulerorigin.pageorigin;

          mydocument.zeropoint = [0,0];

          with(mydocument){

          var mypage = mydocument.pages.item(0);

          with (mydocument.documentpreferences){

          var mypageheight = pageheight;

          var mypagewidth =  pagewidth;}

          var mytextframe = textframes.add();

          mytextframe.geometricbounds = [ mypageheight-2.5, mypagewidth-6.5, mypageheight-1, mypagewidth-1];

          mytextframe.contents = "xxxxxx"

          var myparagraph = mytextframe.paragraphs.item(0);

          with (myparagraph) {

          appliedfont = app.fonts.item("helvetica neue lt pro")

           fontstyle = "55 roman"

          pointsize = 4

          justification = justification.rightalign

           }

 

 

can 1 twek on geometric bounds... , add textframes between page marings.

 

 

thanks & regards

you can page margins using page.marginpreferences (.top, .bottom, etc)

http://jongware.mit.edu/idcs5/pc_marginpreference.html



More discussions in InDesign Scripting


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account