You are on page 1of 1

insertPages http://help.adobe.com/livedocs/acrobat_sdk/10/Acrobat10_HTMLHel...

JavaScript > JavaScript for Acrobat API Reference > JavaScript API > Doc > Doc methods > insertPages

insertPages

5.0 D S X

Inserts pages from the source document into the current document. If a page range is
not specified, the method gets all pages in the source document.

See also deletePages and replacePages.

Note: This method can only be executed during batch and console events. See
Privileged versus non-privileged context for details. The event object contains a
discussion of JavaScript events.

Parameters

nPage (optional) The 0-based index of the page after which to insert
the source document pages. Use -1 to insert pages before the
first page of the document.

cPath The device-independent path to the PDF file that will provide the
inserted pages. The path may be relative to the location of the
current document.

nStart (optional) A 0-based index that defines the start of an inclusive


range of pages in the source document to insert. If only nStart
is specified, the range of pages is the single page specified by
nStart.

nEnd (optional) A 0-based index that defines the end of an inclusive


range of pages in the source document to insert. If only nEnd is
specified, the range of pages is 0 to nEnd.

Example

Insert a cover page to the current document.


this.insertPages ({
nPage: -1,
cPath: "/c/temp/myCoverPage.pdf",
nStart: 0
});

1 of 1 28-Jan-17 11:35 PM