}
} }  Iterator iter = texts.iterator(); String data = ""; while(iter.hasNext()){ GenericText text = (GenericText) iter.next(); data = text.getData(); data = processString(data, userdata, dnfields, pincodes, pukcodes, hardtokensn, hardtokensnwithoutprefix, copyoftokensn, copyoftokensnwithoutprefix, startdate, enddate); text.setData(data);
    public Printable print(UserAdminData userdata,                       String[] pincodes, String[] pukcodes,	                  String hardtokensn, String copyoftokensn) throws IOException, PrinterException {      // Initialize	  DNFieldExtractor dnfields = new DNFieldExtractor(userdata.getDN(), DNFieldExtractor.TYPE_SUBJECTDN);	  // DNFieldExtractor subaltnamefields = new DNFieldExtractor(dn,DNFieldExtractor.TYPE_SUBJECTALTNAME);	  Date currenttime = new Date();	  String startdate = DateFormat.getDateInstance(DateFormat.SHORT).format(currenttime);	  	  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());      // Clone document      Node originaldokument = svgdoc.cloneNode(true);            // Get Text rows	  NodeList list = svgdoc.getDocumentElement().getElementsByTagName("text");	  	  int numberofelements = list.getLength();	  	  for(int i=0; i<numberofelements; i++){		Node node = list.item(i);		  		if(node instanceof SVGTextElement){			  NodeList list2 = ((SVGTextElement) node).getChildNodes();		  int numberofelements2 = list2.getLength();		  for(int j=0;j<numberofelements2;j++){			  Node node2 = list2.item(j);							  String data = ((GenericText) node2).getData();			  data = processString(data, userdata, dnfields, pincodes, pukcodes,			                       hardtokensn, hardtokensnwithoutprefix,			                       copyoftokensn, copyoftokensnwithoutprefix,			                       startdate, enddate);			  			  ((GenericText) node2).setData(data);			  		  }		}						  		  		  		  		  		  	   	  }                             // Add Image      /**      if(userdata.hasimage()){        addImage(userdata);             }        */	  insertImage(userdata); // special dravel for demo            ByteArrayOutputStream baos = new ByteArrayOutputStream();                 // Write it to stream.      	  	  PrintTranscoder t = new PrintTranscoder(); 	  TranscoderInput input = new TranscoderInput(svgdoc);			  	  TranscoderOutput output = new TranscoderOutput(baos);			  // save the image	 	  t.transcode(input, output);	  t.addTranscodingHint(PrintTranscoder. KEY_SCALE_TO_PAGE, new Boolean(false));	         	  	  	   	       // Reuse original document      svgdoc = (SVGOMDocument) originaldokument;                    return t;    }