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

Height change only in the document

Explorer ,
Oct 25, 2020 Oct 25, 2020

Copy link to clipboard

Copied

Hey
I have a document in varying sizes.
I am looking for a  script to change its height to a certain size
(Do not reduce or increase, but only add white on both sides in height)

TOPICS
Acrobat SDK and JavaScript

Views

485

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

correct answers 1 Correct answer

Community Expert , Oct 26, 2020 Oct 26, 2020

I don't think you can have that option in the File Menu, that would be more geared toward developing your own plug-ins, but you can use the Action Wizard to perform batch actions like this one or a Mouse-Up action with a button in the PDF.

 

I would say, to refer to this discussion in which ACP Thom Parker provides valuable links to some of his fine tutorials in regards of media box versus crop box:

 

...

Votes

Translate

Translate
Community Expert ,
Oct 25, 2020 Oct 25, 2020

Copy link to clipboard

Copied

I think you can achieve that by setting a page size. 

 

If you're on windows see slides: 

 

printserverproperties2.png

 

 

 

 

printserver-forms.png

 

 

But if you're looking for a script, below are two different cases that I used trying to help another user in the forums a while ago.

 

In the example below I was using this script with the Action Wizard tool, not from a button, but you can also use it with a button Mouse-Up action. I am not sure who this original script belongs to for the proper credit (maybe Thom Parker).

 

/* Put script title here */
var rCrop = this.getPageBox("Crop",this.pageNum); 
rCrop[0] += 8.5; // Adjust Left Side 
rCrop[1] -= 5.7; // Adjust Top Side 
rCrop[2] -= 0; // Adjust Right Side 
rCrop[3] += 0; // Adjust Bottom Side 
this.setPageBoxes("Crop",this.pageNum,this.pageNum,rCrop);

var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.manual;
pp.printerName = "Epson L805 Series";
this.print({bUI: true, nStart: this.pageNum})

 

 

Here's another case example that I've used with the guidance of some examples found in the Adobe Acrobat API Reference:

 

var pp = this.getPrintParams();
//pp.firstPage = 0;
//pp.lastPage = 24;
pp.interactive = pp.constants.interactionLevel.automatic;
pp.DuplexType = pp.constants.duplexTypes.DuplexFlipLongEdge;
pp.pageHandling = pp.constants.handling.fit;
pp.printerName = "Adobe PDF";
//if (this.getField("CH.6").value == "Yes") {this.print(false, 11,16)};
//this.print(pp);
if (this.getField("CH.6").value == "Yes") {this.print({bUI: false, nStart: 11, nEnd: 16,})};

 

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
Explorer ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

Hi thank you very much first of all.
This is not exactly what I meant.
I meant it:
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.

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
Community Expert ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

In Acrobat Pro use the crop tool for 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
Explorer ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

When I print for film
The system ignores crop size.
Need a professional script

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
Community Expert ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

You can increase the page size without a script.

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
Explorer ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

I need to add size
Not to increase

נשלח מה-iPhone שלי

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
Community Expert ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

increase and add is the same.

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
Explorer ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

I need to enlarge the height to 35
The media box
Not the crop box
I don’t success to do it

נשלח מה-iPhone שלי

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
Community Expert ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

Look at the bottom of the crop tool. Look at change page size.

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
Explorer ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

You're right,
Still looking for an automated script
Who does it in a click
Because we have a lot of these a day

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
Community Expert ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

I think you can also combine the Print Production tool for this task. You can customize a profile.

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
Explorer ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

In conclusion

I still prefer a simple script

To be in the file menu

If anything can make me one I would greatly appreciate it.

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
Community Expert ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

I don't think you can have that option in the File Menu, that would be more geared toward developing your own plug-ins, but you can use the Action Wizard to perform batch actions like this one or a Mouse-Up action with a button in the PDF.

 

I would say, to refer to this discussion in which ACP Thom Parker provides valuable links to some of his fine tutorials in regards of media box versus crop box:

 

 

Below is more in-depth tutorial about what you're asking:

 

 

 

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
Community Expert ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

There's also a paid-for tool by Try67 that you may want to evaluate for this task: 

Acrobat -- Scale PDF Pages

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
Explorer ,
Nov 02, 2020 Nov 02, 2020

Copy link to clipboard

Copied

LATEST

I got along for now.
Thanks!

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