Copy link to clipboard
Copied
Hi
I have a pdf file of 100 pages. I want to create a button that allows me to move pages 106, 107,108,109, after page 110. I tried the "this.movePage" function, but I couldn't. Please, can anyone help me?
Thanks
Copy link to clipboard
Copied
Yes, you can place all the code under the button and execute it with a single click.
Copy link to clipboard
Copied
What do you mean by "I couldn't", exactly? What happened when you tried to use it?
Copy link to clipboard
Copied
Hi
The pages are 110 ten and not 100 as I wrote in the first post.
On page 110 I created a button with the function this.movePage (105, this.numPages-1) which allows me to move the page last in the file.
But I want to move pages 106, 107, 108,109 to the end of the pdf file at the same time
Copy link to clipboard
Copied
Run that same command 4 times.
Copy link to clipboard
Copied
ho provato questa funzione.
this.movePage (105, this.numPages+1)
this.movePage (106, this.numPages+1)
this.movePage (107, this.numPages+1)
this.movePage (108, this.numPages-1)
but the position of the pages changes from this to this
Instead I want the result to be this
Copy link to clipboard
Copied
You need to run the exact same command 4 times, because after each time you run it the pages move one place backwards, so page 107 becomes 106, 108 becomes 107, etc.
Copy link to clipboard
Copied
OK. but is there the possibility of doing this operation without pressing the button 4 times?
Copy link to clipboard
Copied
Yes, you can place all the code under the button and execute it with a single click.
Copy link to clipboard
Copied
ok. Solved. Thank you very much

