String enddate = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date(currenttime.getTime() + (this.validityms)));
String hardtokensnwithoutprefix = hardtokensn.substring(this.hardtokensnprefix.length());
String copyoftokensnwithoutprefix = copyoftokensn.substring(this.hardtokensnprefix.length());
final SVGOMDocument clone = (SVGOMDocument)svgdoc.cloneNode(true);
// Get Text rows
process( "text", userdata, dnfields, pincodes, pukcodes,
hardtokensn, hardtokensnwithoutprefix,
copyoftokensn, copyoftokensnwithoutprefix,
startdate, enddate, clone);
process( "svg:text", userdata, dnfields, pincodes, pukcodes,
hardtokensn, hardtokensnwithoutprefix,
copyoftokensn, copyoftokensnwithoutprefix,
startdate, enddate, clone);
// Add Image
/**
if(userdata.hasimage()){
addImage(userdata);
}
*/
insertImage(userdata, clone); // special dravel for demo
PrintTranscoder t = new PrintTranscoder();
TranscoderInput input = new TranscoderInput(clone);
TranscoderOutput output = new TranscoderOutput(new ByteArrayOutputStream());
t.transcode(input, output);
{
final String aDoNot = clone.getRootElement().getAttribute("doNotScaleToPage");
t.addTranscodingHint( PrintTranscoder.KEY_SCALE_TO_PAGE,
new Boolean(aDoNot==null||aDoNot.trim().length()<=0) );
}
return t;
}