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

newPage
 
D
S
X
Adds a new page to the active document.
Note: This method can only be executed during batch and console events. See Privileged versus non-privileged context for details.
Parameters
 
(optional) The page after which to add the new page in a 1-based page numbering system. The default is the last page of the document. Use 0 to add a page before the first page. An invalid page range is truncated to the valid range of pages.
Example
Add a new page to match the page size of the doc.
	var Rect = this.getPageBox("Crop");
	this.newPage(0, Rect[2], Rect[1]);