I have a PDF file that contains Javascript to do various things - that bit is ok. But I would like to use Javascript to be able to remove pages from the document.
deletePages
Parameters: [nStart], [nEnd]
Returns: Nothing
Deletes pages from the document.
nStart is the zero-based index of the first page in the range of pages to be deleted. The optional
nEnd parameter indicates the last page in the range of pages to be deleted. If nEnd is not
specified then only the page specified by nStart is deleted.
Both nStart and nEnd have a default value of zero, so if this.deletePages() is executed, the first
page (page 0) will be deleted.
See also the insertPages, extractPages and replacePages methods.
Note: You cannot delete all pages in a document: there must be at least one page
remaining.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.