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)
More discussions in InDesign Scripting
adobe
Comments
Post a Comment