With Acrobat 7 standard or above, one can use the doc object "addWatermarkFromText()" method to add the footer. Note this will not work in Reader, One can use the "app.addMenuItem()" to add the script to the menu bar, but I would rewrite the code as an application function and then call that function from the added menu item.
this.addWatermarkFromText({ cText: this.documentFileName.split(".").shift(), // get the file name without extension nFontSize: 8, // font size nStart: 0, // start page nEnd: this.numPages, // end page bOnTop: true, // over content bOnScreen: true, // display on screen bOnPrint: true, // show on print nTextAlign: app.constants.align.left, // align text nHorizAlign: app.constants.align.left, // align field horizontally nVertAlign: app.constants.align.bottom, // align field vertically nHorizValue: +0.25 * 72, // horizontal adjustment in inches and converted to points nVertValue: +0.25 * 72 // vertical adjustment in inches and converted to points })
this.addWatermarkFromText({
cText: this.documentFileName.split(".").shift(), // get the file name without extension
nFontSize: 8, // font size
nStart: 0, // start page
nEnd: this.numPages, // end page
bOnTop: true, // over content
bOnScreen: true, // display on screen
bOnPrint: true, // show on print
nTextAlign: app.constants.align.left, // align text
nHorizAlign: app.constants.align.left, // align field horizontally
nVertAlign: app.constants.align.bottom, // align field vertically
nHorizValue: +0.25 * 72, // horizontal adjustment in inches and converted to points
nVertValue: +0.25 * 72 // vertical adjustment in inches and converted to points
})
George Kaiser