Skip to main content
Participant
April 16, 2020
Question

USING VBA TO CHANGE PAGE SIZE AND THEN CROP

To format a PDF document to properly have a Gutter I ahve to do a Manual Process. I was looking to Automate this using VBA in Excel. I have the Doument Open and Can get page #'s but API is not clear from there on how to rezise and Crop pages

 

I print document 7.75" x 11

 

I open PDF

I Click Crop

I Chnage Page Size

(X) Custom Width 9.25, Height 11

(X) Center, XOffset .75"

(X) All

 

Then I go back in to Crop

(X) All Pages

(X) Odd Only

Right .75

OK

 

Then I go back in to Crop

(X) All Pages

(X) Even Only

Left .75

OK

 

What i get is an 8.5x11 Document with a .75" Gutter for hole punching when printed double sided

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Legend
April 16, 2020

Step 1 is setting the media box and steps 2-3 are setting the crop box. You can use JavaScript setPageBox to do this. 

Translate
Participant
May 15, 2020

But I am trying to do from API and I dont see a Set Page Box

 

Translate
Legend
May 16, 2020

Yes. Use the JavaScript setPageBox API. The is all described in the Acrobat SDK, including how to use Acrobat JavaScript from VB. 

Translate