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

USING VBA TO CHANGE PAGE SIZE AND THEN CROP

New Here ,
Apr 15, 2020 Apr 15, 2020

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
2.2K
Translate
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

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
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

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

 

Translate
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
LATEST

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

Translate
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