Hi,
If i convert the trimbox size by Switch Calculation (pt > mm), with a precision of 2
i do not wan't to see decimals if they there is not meaningful
For instance: 420.00 mm
Should be: 420 mm
Rounded by ceil expression does not work.
How can i fix this?
Calculation Precission mm rounded no decimals
Re: Calculation Precission mm rounded no decimals
Don't think you can get this in one pass. I don't know what is the final intention but you might need the scripting module to implement such logic.
Re: Calculation Precission mm rounded no decimals
You can also use the round function which is mentioned in the description on your screenshot.
For example, you can just place the round around the complete expression, for example like this:
[Switch.Calculation:Expression="round([Stats.MediaBoxHeight:Type="Defined"])"]
Edit: That will of course round the complete thing. If you only want to remove the obsolete zero's I also think you'll need the scripting module.
For example, you can just place the round around the complete expression, for example like this:
[Switch.Calculation:Expression="round([Stats.MediaBoxHeight:Type="Defined"])"]
Edit: That will of course round the complete thing. If you only want to remove the obsolete zero's I also think you'll need the scripting module.
Re: Calculation Precission mm rounded no decimals
If you have the Switch Scripting module then this javascript will do what you ask for.
The resulting values can be accessed thru Job>PrivateData Key New_Height and New_Width.
The resulting values can be accessed thru Job>PrivateData Key New_Height and New_Width.
Code: Select all
function jobArrived( s : Switch, job : Job )
{
var width = job.getVariableAsNumber("[Stats.TrimboxWidth]");
var height = job.getVariableAsNumber("[Stats.TrimboxHeight]");
var inputJob = job.getPath();
var theFileName = job.getNameProper()
New_Width = Math.floor((width/72)*25.4+0.5);
New_Height = Math.floor((height/72)*25.4+0.5);
job.setPrivateData( ”New_Width", New_Width );
job.setPrivateData( "New_Height", New_Height );
job.sendToSingle( inputJob, theFileName );
}
Enfocus Switch, Enfocus PitStop Server, Enfocus PDF Review, HP SmartStream& Kodak Prinergy with RBA
Offset 72x102, Offset Large Format, Digital Large Format and Digital print.
Offset 72x102, Offset Large Format, Digital Large Format and Digital print.