Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's wrong with tis code?

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
US
I have this code to append two sets of reports CIS(A115A)_x.pdf and CIS(A116A)_x.pdf into one pdf document. It's supposed to append the cPath into the sPath and it's not doing anything at all.

var j=1;
try {
while (j < 13)
{
var sPath=&quot;C:/Books/CIS(A116A)_&quot; + j + &quot;.pdf&quot;;
var re = /.*\/|\.pdf$/ig;
var re1= /(A116A)/ig;
var filename = sPath.path.replace(re,&quot;&quot;);
var filename = sPath.path.replace(re1,&quot;(A115A)&quot;);
sPath.insertPages({
nPage: -1,
cPath: &quot;C:/Books/&quot;+filename+&quot;_&quot;+j+&quot;.pdf&quot;,
nStart: 0,
nEnd: 2
})
i++;
}
}
catch (e) {
console.println(&quot;Aborted: &quot;+e)
}

ny help will be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top