Script error - undefined member 'numPages'
Posted: Wed Aug 01, 2012 3:23 pm
I'm having issues with the following javascript, which is meant to add the filename to the last page of the file. While the code listed below works fine as a part of an Acrobat Action (in versions 8-X, minus the jobArrived piece) I get errors referring to undefined member 'numPages'.
I know that javascript will sometimes work even if it isn't correct, and I'm thinking that may be the case here - can anyone help point me in the right direction here?
By the way, I've also tried using this as a .sequ through the Acrobat configurator.
PowerSwitch 10
Acrobat 8
Windows Server 2003
function jobArrived( s : Switch, job : Job )
{
}
({ nStart: this.numPages - 1});
this.addWatermarkFromText({ cText: this.documentFileName.replace(/.pdf$/i,""),
cFont: "Arial",
nFontSize: 9,
nHorizAlign: app.constants.align.right,
nVertAlign: app.constants.align.bottom,
nHorizValue: -30 ,
nVertValue: 20});
I know that javascript will sometimes work even if it isn't correct, and I'm thinking that may be the case here - can anyone help point me in the right direction here?
By the way, I've also tried using this as a .sequ through the Acrobat configurator.
PowerSwitch 10
Acrobat 8
Windows Server 2003
function jobArrived( s : Switch, job : Job )
{
}
({ nStart: this.numPages - 1});
this.addWatermarkFromText({ cText: this.documentFileName.replace(/.pdf$/i,""),
cFont: "Arial",
nFontSize: 9,
nHorizAlign: app.constants.align.right,
nVertAlign: app.constants.align.bottom,
nHorizValue: -30 ,
nVertValue: 20});