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

USING VBA TO CHANGE PAGE SIZE AND THEN CROP

New Here ,
Apr 15, 2020 Apr 15, 2020

Copy link to clipboard

Copied

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

TOPICS
Acrobat SDK and JavaScript

Views

1.6K

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
LEGEND ,
Apr 15, 2020 Apr 15, 2020

Copy link to clipboard

Copied

Step 1 is setting the media box and steps 2-3 are setting the crop box. You can use JavaScript setPageBox to do 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
New Here ,
May 15, 2020 May 15, 2020

Copy link to clipboard

Copied

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

 

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
LEGEND ,
May 15, 2020 May 15, 2020

Copy link to clipboard

Copied

LATEST

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

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