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

Can I make "insert before" the default for inserting pages?

New Here ,
Feb 13, 2021 Feb 13, 2021

Copy link to clipboard

Copied

I often build up a document by adding pages from various sources in chronological order, with the most recent first, so I insert pages with the settings Before First a lot.  I have to set them every time I've opened Acrobat, though.  (I'm using Acrobat 8 Standard, Acrobat 9 Pro, Acrobat DC, & other versions on other machines.)  I only takes a couple of keystrokes or key combinations, but I do it so much that I'd love to avoid even that & just have the default set to insert before the first page.  Is there any way to do so?

TOPICS
Create PDFs , Edit and convert PDFs

Views

1.1K

Translate

Translate

Report

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

Advisor , Feb 15, 2021 Feb 15, 2021

Hello Tim,

 

The below code creates a custom menu item using javascript,  it inserts pages "Before First" from a selected pdf file.

 

 

//Save this in the ....\Acrobat\Javascripts\  program or user directory 
//  as a .js file to load as Add-In

app.addSubMenu({ cName: "Custom Tools", cParent: "Edit", nPos: 0 }); 

app.addMenuItem({ cName: "Insert pages before first", cParent: "Custom Tools", cExec: "insertPagesBefore()"});


insertPagesBefore = app.trustedFunction(function (){

app.beginPriv(); 

va
...

Votes

Translate

Translate
Community Expert ,
Feb 13, 2021 Feb 13, 2021

Copy link to clipboard

Copied

Hi Timothy,

 

It's been my experience that this setting is "sticky." That is if you set it to Before First one time, the next time you use it it will be set to the same thing. 

 

Is this not happening?

Votes

Translate

Translate

Report

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
New Here ,
Feb 13, 2021 Feb 13, 2021

Copy link to clipboard

Copied

Gary, thanks for replying.  The setting is sticky as long as I keep Acrobat open, but if I close it and reopen it, the defaults of Insert After and the current page are in place again.  I'm looking for a way to change the defaults themselves, so that when I open Acrobat, the settings are Insert Before and first page without my having to change them the first time I insert a page.

Votes

Translate

Translate

Report

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 13, 2021 Feb 13, 2021

Copy link to clipboard

Copied

Not possible.

Votes

Translate

Translate

Report

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
New Here ,
Feb 14, 2021 Feb 14, 2021

Copy link to clipboard

Copied

That's what I was afraid of.  Bernd, you say it quite absolutely.  Is that based on a documented limitation or just practical experience wherein you've also not found a way to do it?  Thanks.

Votes

Translate

Translate

Report

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 14, 2021 Feb 14, 2021

Copy link to clipboard

Copied

There is no setting for this.

Votes

Translate

Translate

Report

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
Advisor ,
Feb 15, 2021 Feb 15, 2021

Copy link to clipboard

Copied

Hello Tim,

 

The below code creates a custom menu item using javascript,  it inserts pages "Before First" from a selected pdf file.

 

 

//Save this in the ....\Acrobat\Javascripts\  program or user directory 
//  as a .js file to load as Add-In

app.addSubMenu({ cName: "Custom Tools", cParent: "Edit", nPos: 0 }); 

app.addMenuItem({ cName: "Insert pages before first", cParent: "Custom Tools", cExec: "insertPagesBefore()"});


insertPagesBefore = app.trustedFunction(function (){

app.beginPriv(); 

var userPickedDoc = app.browseForDoc();

var sourceDoc = userPickedDoc.cPath; 

this.insertPages({nPage:-1, cPath: sourceDoc});

app.endPriv();
app.alert("Done inserting pages before first!");
})

 

 

Regards,

Mike

 

Votes

Translate

Translate

Report

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
New Here ,
Feb 21, 2021 Feb 21, 2021

Copy link to clipboard

Copied

LATEST

Mike,

That worked brilliantly.  I made a couple minor changes to facilitate quick keyboard access and removed the post-insertion alert (which was a good touch for debugging, but not necesssary for operational use).  I appreciate your taking the time to provide such a helpful response!

 

For reference, here's what I hacked your code into:

 

app.addSubMenu({ cName: "&Custom Tools", cParent: "Edit", nPos: 0 });

app.addMenuItem({ cName: "Insert &Before", cParent: "&Custom Tools", cExec: "insertPagesBefore()"});

insertPagesBefore = app.trustedFunction(function (){

app.beginPriv();

var userPickedDoc = app.browseForDoc();

var sourceDoc = userPickedDoc.cPath;

this.insertPages({nPage:-1, cPath: sourceDoc});

app.endPriv();
})

 

Warm & grateful regards,

Timothy 

Votes

Translate

Translate

Report

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