I have created a batch process to add a form field (MyDate) that will print the date and time at 90 degrees, that is down the left hand margin. It does add the field to every page however, it only sets the orientation of the field for the first page to 90 degrees. All other pages remain at an orientation of 0 degrees.
Can anyone help explain what I need to do to set the orientation to 90 degrees on every page? Everything else seems to work. The script is as follows:
for (var p = 0; p < this.numPages; p++)
{
var fd = this.addField("MyDate", "text", p, [25,108,41,360]);
fd.rotation = 90;
fd.textSize=10;
fd.textFont = font.TimesBI;
fd.alignment = "left";
fd.fillColor = color.transparent;
fd.textColor = color.black;
fd.readonly = false;
fd.print = true;
fd.display = display.noView;
}
// add WillPrint script to populate the form field
this.setAction({cTrigger: "WillPrint", cScript: "var fld = this.getField(\"MyDate\"); fld.value = \"Document Printed on \" + util.printd(\"dd-mmm-yyyy, h:MM tt\",new Date()); \r"});
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com