Page 1 of 1

variable

Posted: Tue Aug 16, 2011 7:01 pm
by kmcrae
Hi,



the variable [Stats.PageHeight] the result is in "point" size i want the result in "inch" size?

variable

Posted: Tue Aug 16, 2011 7:18 pm
by Harald Mahrer
Hi,



as I'm from Austria I don't know the conversition factor from points to inches, but I got a small script-expressions from rzacherl which helped me to convert from points to millimeters. This should work for You if you just change the "0.35277" to your conversion factor and the Stats.MediaBoxWidth to the Stat You like to approach. You can skip the + " mm" in the end, if you do not want to attached the unit. You copy and paste the lines below to the "scripted expressions" editor where You need it (eg for the standard value of metadata field)





function convert() {

var MBpt = job.getVariableAsNumber( "[Stats.MediaBoxWidth]" );

var MBmm = Math.round( MBpt * 0.35277 ).toString();

return MBmm + " mm"

}

convert();



I hope You can use this.



Best regards from Vienna.

variable

Posted: Tue Aug 16, 2011 11:34 pm
by dkelly
The conversion points to inches is 1/72 or 0.0138888889





function convert() {

var MBpt = job.getVariableAsNumber( "[Stats.MediaBoxWidth]" );

var MBin = Math.round( MBpt * 0.0138888889 ).toString();

return MBin + " in"

}

convert();





Dwight Kelly

Apago, Inc.

dkelly@apago.com