file is not a valid pdf file
Posted: Tue May 05, 2015 9:09 am
I'm working on a flow for automation of our business card production.
After the files are dropped in a hot folder I use this script to determine which template to use for the imposition.
The file is then sent to the HP SmartStream Designer Imposition, but at this stage I get an error saying that the file is not a valid pdf file.
If I make a duplicate of the flow and send the pdf directly to the SmartStream designer I don't get this error, so I'm guessing the problem has to be related to something with my script.
Any suggestions?
After the files are dropped in a hot folder I use this script to determine which template to use for the imposition.
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()
templateWidth = Math.floor((width/72)*25.4+0.5);
templateHeight = Math.floor((height/72)*25.4+0.5);
templateName = templateWidth+'x'+templateHeight;
job.setPrivateData( "template", templateName );
job.sendToSingle( inputJob, theFileName );
}
If I make a duplicate of the flow and send the pdf directly to the SmartStream designer I don't get this error, so I'm guessing the problem has to be related to something with my script.
Any suggestions?