Depends but typically they will already be bates labeled and may also have an exhibit stamp. This stamp would be an actual exhibit sticker v. the exhibit text I am looking to add. The exhibit numbers will not match up.
Here's the script:
if(global.ExhibNum==undefined)
{global.ExhibNum=1}
if(global.PageNmbr==undefined)
{global.PageNmbr=1}
for(var i=0;i<this.numPages;i++)
{
var cb=this.getPageBox("Crop",i)[2];
var f=this.addField("Numbering."+i,"text", i,[0, 72*.5, cb, 72*.25]);
f.alignment="center";
f.value="Exhibit "+ global.ExhibNum + " - Page " + global.PageNmbr;
global.PageNmbr=Number(global.PageNmbr)+1;
}
global.ExhibNum=Number(global.ExhibNum)+1;
this.flattenPages();
Notes:
1) The bottom of the field is 1/4 inch from the bottom of the page (72*.25). The top of the field is 1/2 inch from the bottom of the page (72*.5). Adjust acccordingly.
2) The line this.flattenPages(); flattens all fields and annotations. If you only want to flatten the fields created you will have to write another script to do this.
3) Make sure you run the following script in the console after each run so the global variables do not continue for the next run:
delete global.PageNmbr;
delete global.ExhibNum;
If you want to automatically delete these global variables after the run, this article explains how.