Skip to main content
Known Participant
October 27, 2020
Question

Need a script for acrobat for free/nominal fee - to change height in document

  • October 27, 2020
  • 2 replies
  • 2072 views

Every document I run the script, the height changes to 35 cm and the width remains the same.

For example:
I have a document size 10 width by 21 height, I want to change the height to 35.
The media size, not the crop size.
another example:
Document size 15 width by 20 height, I want to change the height to 35.

 

The script will be inside the menu in Acrobat.

This topic has been closed for replies.

2 replies

try67
Community Expert
October 28, 2020

You can use this code to do it:

 

var pageBox = this.getPageBox("Media", this.pageNum);
var pageWidth = pageBox[1]-pageBox[3];
var newPageBox = [0, pageWidth, 35*28.3465, 0];
this.setPageBoxes("Media", this.pageNum, this.pageNum, newPageBox);
aviel222Author
Known Participant
October 28, 2020
Hey

Thank you!!



I put it in the "Java Scripts" folder

Of Acrobat

But I do not see it appearing

You can please arrange for it to appear under a menu

"file"?
aviel222Author
Known Participant
October 28, 2020
I also tried through the acrobat and it only changes the width and not the height.

In addition, the same should be changed to cropbox as well.
BarlaeDC
Community Expert
October 27, 2020

Hi,

When you say you want the height changed, are you wanting the contents of the page to change?

 

Regards

 

Malcolm

aviel222Author
Known Participant
October 27, 2020

No.

Only to add white up and down