Skip to main content
Known Participant
Oct 27, 2020 5:03 PM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

16 replies

try67
Community Expert
Community Expert
Oct 28, 2020 4:59 PM UTC

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);
Translate
aviel222Author
Known Participant
Oct 28, 2020 5:13 PM UTC
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"?
Translate
aviel222Author
Known Participant
Oct 28, 2020 5:34 PM UTC
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.
Translate
BarlaeDC
Community Expert
Community Expert
Oct 27, 2020 7:02 PM UTC

Hi,

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

 

Regards

 

Malcolm

Translate
aviel222Author
Known Participant
Oct 27, 2020 11:14 PM UTC

No.

Only to add white up and down

Translate