Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript within the PDF - How do I ...?

Status
Not open for further replies.

AlexNeil

Programmer
Jun 4, 2001
49
GB
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.

Is there a Javascript method to remove pages?


cheers,
Alex
 
From the 5185AcroJS 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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top