Replace whatever value you want like I do with the lineBreaks over here;
Code: Select all
function jobArrived( s : Switch, job : Job )
{
// Get propertyValue
var privateDataKey = s.getPropertyValue('PrivateData');
// Create file with Windows-1252 coding, needed for certain characters
var readBody = File.read(job.getPath(), "Windows-1252");
// Replace LF with CRLF, Prodist needs CRLF for correct parsing of e.g. addresses
var replaceLineBreak = readBody.replace(/\n/g,"\r\n");
// Put body in private data
job.setPrivateData(privateDataKey, replaceLineBreak);
job.sendToSingle(job.getPath());
}