Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

move pages

Participant ,
Oct 31, 2021 Oct 31, 2021

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

TOPICS
JavaScript
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Oct 31, 2021 Oct 31, 2021

Yes, you can place all the code under the button and execute it with a single click.

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2021 Oct 31, 2021

What do you mean by "I couldn't", exactly? What happened when you tried to use it?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 31, 2021 Oct 31, 2021

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2021 Oct 31, 2021

Run that same command 4 times.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 31, 2021 Oct 31, 2021

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)prova 1.JPGexpand image

but the position of the pages changes from this to this

prova 2.JPGexpand image

Instead I want the result to be this

prova 3.JPGexpand image

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2021 Oct 31, 2021

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 31, 2021 Oct 31, 2021

OK. but is there the possibility of doing this operation without pressing the button 4 times?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2021 Oct 31, 2021

Yes, you can place all the code under the button and execute it with a single click.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 31, 2021 Oct 31, 2021
LATEST

ok. Solved. Thank you very much

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines