-
1. Re: undo spawned page in Reader DC
George_Johnson Dec 12, 2016 9:12 PM (in response to pdfUser1)You can use the doc.deletePages method to delete a page that was created by spawning a template.
-
2. Re: undo spawned page in Reader DC
pdfUser1 Dec 12, 2016 10:22 PM (in response to George_Johnson)Thanks for the quick response, George. I tried the bit of script you provided. I created a button and attached doc.deletePages to mouseUp action but nothing happened in Acrobat Pro X. I saved the doc then tried to open it in Reader DC, still nothing. Forgive my lack javascripting knowledge, I'm trying to learn. I just don't understand. That's why I ask for examples. Sometimes someone will provide the help, sometimes not.
-
3. Re: undo spawned page in Reader DC
George_Johnson Dec 12, 2016 10:44 PM (in response to pdfUser1)It wasn't meant to be a script, but rather the name of the method you need to use. The Acrobat JavaScript reference documentation will show how it's used, particularly the start and stop page numbers. You'll need to be able to keep track of which pages were created by spawning a template. This can either be very simple or more complicated depending on how you've set things up. For example, if you begin with a single page PDF and it now has two pages (doc.numPages == 2), and you've set up the code to create a new page at the end of the document, you can delete the page with the following:
// Delete the last page of the document
deletePages({nStart: numPages - 1});
You can find the documentation in the freely available Acrobat SDK or by doing a search for "Acrobat JavaScript Reference".
-
4. Re: undo spawned page in Reader DC
George_Johnson Dec 12, 2016 10:50 PM (in response to George_Johnson)Also, if you want to use a button on a page to delete it, you can use the following as the Mouse Up script of the button:
// Delete this page
deletePages({nStart: event.target.page});
-
5. Re: undo spawned page in Reader DC
JR_Boulay Dec 13, 2016 2:47 AM (in response to pdfUser1)1 person found this helpfulHi.
- Reader can delete spawned pages only. (vs Acrobat Pro/Sta).
- Spawning/deleting pages requires Reader XI or DC, this is not supported in older versions (but it works in any Acrobat Pro/Sta version).
- The PDF must NOT be Reader-Extended: this prevent spawning to works in Reader XI and DC.
-
6. Re: undo spawned page in Reader DC
pdfUser1 Dec 13, 2016 3:12 AM (in response to JR_Boulay)1 person found this helpfulI have followed you guys for what seems like years now, on the AcrobatUsers forum and both of you (and many others) have helped me by giving of your time. You all have been very generous with it. I thank all you guys for the lessons I've learned. I truly enjoy working with javascript and discovering new capabilities of using it with PDFs.
-