how to create a delete page function that works in Reader
- August 10, 2023
- 2 replies
- 5441 views
Greetings,
I apologize in advance for my post being very basic -- I am a novice when it comes to using Acrobat Pro.
I've been tasked by my supervisor with creating a 3-page PDF that includes an instruction page on page 1 and a delete button that will remove said instruction page. The remaining two pages are a fillable form. I am using the following script for my delete function:
this.deletePages(this.pageNum)
I am working on a Macbook Air using the latest version of Acrobat Pro. The button works for me when I preview the PDF in Acrobat Pro. However, when I test out the delete button in the latest version of Reader on my personal Macbook Air, nothing happens and I get the following error message in the Javascript debugger:
RaiseError: This operation is not permitted.
Doc.deletePages:1:Field Button3:Mouse Up
===> This operation is not permitted.
In Acrobat Pro, I've verified that I have no document restrictions enabled (all say "Allowed"). I also made sure that "No Security" is selected for the Security Method and that "All versions of Acrobat" is showing next to "Can be Opened by:" in the Document Properties > Document Security > Security Method menu. However, in Reader the document restrictions show that Document Assembly and Page Extraction are not allowed. I have no idea how this is happening or if this is the root cause of the error, but I am at a loss and could really use some help in how to correct this problem.
Additionally, I would like to include a digital signature field but have omitted one for now as I troubleshoot the delete button problem. I worry that the e-signature might cause further issues with permissions by interacting with the delete button's properties.
I've attached a skeleton version of the form. Thank you in advance for your time and help.
