Dynamic Print Date with Windows Login ID using Will Print
I use this code and it worked , I need to add the "Windows Login ID" with the print as " This document was printed on dd/mm/yyyy by User Name" Can you help in this to modify the code.
var inch = 54;
for (var p = 0; p < this.numPages; p++) {
var aRect = this.getPageBox( {nPage: p} );
aRect[1] = .5*inch;
aRect[3] = aRect[1] - 24; // and 24 points high
var f = this.addField("PrintField", "text", p, aRect )
- f.delay = true;
- f.textSize = 06;
- f.textFont = font.Helv;
- f.textColor = color.black;
- f.alignment = "right";
- f.readonly = true;
- f.display = display.noView;
- f.delay = false;
}
var myWillPrintScript = 'var f = this.getField("PrintField"); \r'
+ 'f.value = "Printed on " + util.printd("dd/mm/yyyy hh:MM tt", new Date()); \r';
- this.setAction("WillPrint", myWillPrintScript);
