Skip to main content
Participant
March 17, 2021
Answered

Add blank page after every page in acrobat

  • March 17, 2021
  • 1 reply
  • 7769 views

I need to add a blank page between every page in my file(s).

What is the JavaScript I use in the Action Wizard to accomplish this?

 

This topic has been closed for replies.
Correct answer BarlaeDC

Hi,

 

So just wrap it in a loop, something like

for ( var i = this.numPages; i > 0; i--){
var Rect = this.getPageBox("Crop");
this.newPage(i, Rect[2], Rect[1]);
}

Although depending on the setup of your file you might need to change the How you get the page Size.

 

1 reply

BarlaeDC
Community Expert
Community Expert
March 17, 2021

Hi,

 

This would probably only work in the full Acrobat product, but you can use the newPage method from the Document object.

(from js_api_reference)

 

Add a new page to match the page size of the doc.

var Rect = this.getPageBox("Crop"); 
this.newPage(0, Rect[2], Rect[1]); 

 

Participant
March 17, 2021

I don't think I was clear. I have a 500 page file, and I need to add a blank page after each page, making it a 1000 page document.

I have Acrobat DC.

 

I used to have an Action Wizard shortcut to do this, but it was deleted when Adobe "accidentally" deleted my account & I had to re-install my apps.

I remember setting up the Action Wizard using JavaScript.

BarlaeDC
Community Expert
BarlaeDCCommunity ExpertCorrect answer
Community Expert
March 17, 2021

Hi,

 

So just wrap it in a loop, something like

for ( var i = this.numPages; i > 0; i--){
var Rect = this.getPageBox("Crop");
this.newPage(i, Rect[2], Rect[1]);
}

Although depending on the setup of your file you might need to change the How you get the page Size.