Skip to main content
November 14, 2016
Question

Using Javascript to insert pdfs

  • November 14, 2016
  • 10 replies
  • 861 views

How do I insert 6 other pdf documents into a different open pdf file using javascript?  All the files are in the same directory/

This topic has been closed for replies.

10 replies

November 15, 2016

Nothing.  The file doesn't attach to the open document.

try67
Community Expert
Community Expert
November 15, 2016

What is the output in the console itself? Something must be written when you run the code...

November 15, 2016

I am running the code using the console window.

try67
Community Expert
Community Expert
November 15, 2016

OK, and what happens when you run it, exactly?

try67
Community Expert
Community Expert
November 14, 2016

Read the documentation of the insertPages method of the Document object.

November 14, 2016

I have tried using the following but I can't get it to work..

this.insertPages({nPage: -1, cPath: "Report1.pdf", nStart: 0});

try67
Community Expert
Community Expert
November 14, 2016

What does "can't get it to work" mean, exactly? Are you getting an error message? If so, what does it say?

Also, from where are you running this code?