|
| Script to crop |
 |
Wed, 30 Apr 2008 17:05:53 -070 |
I have a javascript that I use in a batch process and I need to add a
"crop". I am not sure what the best way is to have this done but I
need to convert my 8.5x5.5 document to an 11x8.5 document. After the page size
is expanded I add a background to fill in the rest of the space.
The image doesn't to be expanded just the page size so I can add my background.
Using Acro Pro 7
|
| Post Reply
|
| Re: Script to crop |
 |
Mon, 12 May 2008 14:52:12 -070 |
I'm not sure how to add JavaScript to a batch process, but here's some code we
use to increase the bottom and right margins. A couple of small tweaks should
adapt it to include the top and left margins.
We increase both the Media box and Crop box. I'm not sure what makes sense in
your case.
Bruce
//-----
function increaseMargins(p,box,marginIncrease)
//increase margins for a specified box (e.g. Media, Crop)
{
var rect = this.getPageBox(box,p);
var newRect = new Array();
newRect[0] = rect[0];
newRect[1] = rect[1];
newRect[2] = rect[2] + (marginIncrease);
newRect[3] = rect[3] - (marginIncrease);
this.setPageBoxes(box,p,p,newRect);
}
var marginIncrease = 0.25 * 72; // quarter inch increase
var firstPage = 1;
var lastPage = this.numPages;
|
| Post Reply
|
|
|
|
|
|
|
|
|
|