Skip to main content
Nov 14, 2016 7:48 PM UTC
Question

Using Javascript to insert pdfs

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 is closed to new replies. Start a new post to keep the conversation going.

10 replies

Nov 15, 2016 1:22 PM UTC

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

Translate
try67
Community Expert
Community Expert
Nov 15, 2016 1:26 PM UTC

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

Translate
Nov 15, 2016 1:18 PM UTC

I am running the code using the console window.

Translate
try67
Community Expert
Community Expert
Nov 15, 2016 1:20 PM UTC

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

Translate
try67
Community Expert
Community Expert
Nov 14, 2016 8:10 PM UTC

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

Translate
Nov 14, 2016 8:14 PM UTC

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

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

Translate
try67
Community Expert
Community Expert
Nov 14, 2016 8:18 PM UTC

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?

Translate