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

Insert PDF after a selected page

Guest
Feb 15, 2017 Feb 15, 2017

I've built an action (using action wizard) in Acrobat XI Pro that inserts a single-page PDF file into another with this code:

this.insertPages({cPath:"/C/Scanning Temp Storage/Blank Red Page.pdf"});

I would like to find a way to have that page inserted after a selected page. So, varies from document to document.

I used to have this action working the way I want it, but it got broken after I had to migrate my customized actions from one Windows user to another.

Thanks for any help!

TOPICS
Acrobat SDK and JavaScript , Windows
940
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

correct answers 1 Correct answer

Community Expert , Feb 15, 2017 Feb 15, 2017

Your code would become...

this.insertPages({nPage: this.pageNum, cPath:"/C/Scanning Temp Storage/Blank Red Page.pdf"});

... to insert after the current page. This generally means the page that you see selected in the Pages view. I'm not sure what a selected page would mean.

Translate
Community Expert ,
Feb 15, 2017 Feb 15, 2017

By "selected page", do you mean the current page that is being viewed? If not, what do you mean, exactly?

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
Guest
Feb 15, 2017 Feb 15, 2017

Yep - has a blue "halo" when viewed in the page thumbnails tab.

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 ,
Feb 15, 2017 Feb 15, 2017

Your code would become...

this.insertPages({nPage: this.pageNum, cPath:"/C/Scanning Temp Storage/Blank Red Page.pdf"});

... to insert after the current page. This generally means the page that you see selected in the Pages view. I'm not sure what a selected page would mean.

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
Guest
Feb 15, 2017 Feb 15, 2017
LATEST

This was exactly what I was looking for! Thanks

I knew about the nPage function, but I didn't know what the modifier for a current page would be.

Thanks again!

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