Article View: adobe.scripting.indesign
Article #9462Re: Numbering based on auto page number
From: Kasyan Servetsky
Date: Mon, 21 Aug 2006 12:16
Date: Mon, 21 Aug 2006 12:16
13 lines
1279 bytes
1279 bytes
Hi Dee,
I remade a little Herrmueller's script. It creates 2 text boxes on every page and places page number into one and coupon number (pagenumber + 9000) into another. You can regulate where to place the text boxes and their sizes by geometricBounds parameter.
doc=app.activeDocument;
pgLn = doc.pages.length;
for(i=pgLn;i>0;i--){
myPageFrame = doc.pages[i-1].textFrames.add();
myPageFrame.geometricBounds = [20, 10, 30, 40];
myPageFrame.contents = "Page " + doc.pages[i-1].name;
myCouponFrame = doc.pages[i-1].textFrames.add();
myCouponFrame.geometricBounds = [20, 40, 30, 80];
myCouponFrame.contents = "Coupon Number " + (parseInt(doc.pages[i-1].name) + 9000);
}
Technical Details
Message-ID:
<3bc14d44.7@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!news.ecp.fr!news.stben.net!webcrossingReferences:
<3bc14d44.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,f696280db6c146fa X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Kasyan Servetsky" <kas@email.ua> Newsgroups: adobe.scripting.indesign Subject: Re: Numbering based on auto page number Message-ID: <3bc14d44.7@webcrossing.la2eafNXanI> Date: Mon, 21 Aug 2006 05:16:55 -0700 References: <3bc14d44.-1@webcrossing.la2eafNXanI> Lines: 17 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!news.ecp.fr!news.stben.net!webcrossing