How to merge two PDF


hi forum,

 

this first day in learning javascript acrobat

 

i used tutorial script merge 2 pdf, showing syntax error, please help, beginner,

 

 

below code

 

// create new pdf document:

 

var newdoc = app.newdoc();

 

// insert doc1.pdf:

 

newdoc.insertpages({

 

npage : -1,

 

cpath : "d:\doc1.pdf",

 

});

 

// insert doc2.pdf:

 

newdoc.insertpages({

 

npage : newdoc.numpages,

 

cpath : "d:\doc2.pdf",

 

});

 

// save new document:

 

newdoc.saveas({

 

"d:\mynewdoc.pdf");

});

 

 

 

this error message get,

 

"syntaxerror: missing : after property id 29: @ line 30"

 

 

error.jpg

thanks in advance,

 

thanks & regards

sathish v.

you're not using correct path syntax.

to see correct path syntax of file, open , execute

this code in js console:

this.path



More discussions in JavaScript


adobe

Comments

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

uppercase letters in url - Joomla! Forum - community, help and support

Joomla! Update is not offering Joomla 3 - Joomla! Forum - community, help and support