The PDF list is a service provided by PDFzone.com | http://www.pdfzone.com
__________________________________________________________________

Here is a Javascript batch file I wrote quite some time ago while I worked
for a newspaper printing firm. We used to get quite a few jobs coming in
with the pages in their PDF files all different sizes. This will change the
document size of the document to what you set in mm, sorry if your not
metric, you'll have to work out the ratio yourself.

// Put the Size you want in mm here //
x=310;
y=500;

// Points to mm //
var p=2.8347

// Page size //
var aRect = this.getPageBox("Media");
var width = (aRect[2] - aRect[0])/p;
var height = (aRect[1] - aRect[3])/p;
var nPages = this.numPages;

// Ammount to add or delete off sides //
var lefttrim = (x-width)/2;
var righttrim =(x-width)/2;
var toptrim = (y-height)/2;
var bottomtrim = (y-height)/2;

// Set the page size //

if (x<width)
{

this.setPageBoxes("Media",0,nPages-1,[(0-lefttrim*p),(0-bottomtrim*p),(width
+righttrim)*p,(height+toptrim)*p]);
}
else
{
this.setPageBoxes("Media",0,nPages-1,[(0-lefttrim*p),(0-bottomtrim*p),(width
+righttrim)*p,(height+toptrim)*p]);

this.setPageBoxes("Crop",0,nPages-1,[(0-lefttrim*p),(0-bottomtrim*p),(width+
righttrim)*p,(height+toptrim)*p]);
}



To change your subscription:
http://www.pdfzone.com/discussions/lists-pdf.html

Reply via email to