0% found this document useful (0 votes)
230 views

Javascript Code To Insert Page in PDF

Javascript code that duplicates each page in PDF useful for when you have a 2Page scan of a book. you can duplicate each page, and then crop each other page

Uploaded by

Baraa SmarTy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
230 views

Javascript Code To Insert Page in PDF

Javascript code that duplicates each page in PDF useful for when you have a 2Page scan of a book. you can duplicate each page, and then crop each other page

Uploaded by

Baraa SmarTy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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

You might also like