//form printing code....

var win;
function printImage (pdf) {
  if (win && !win.closed)
    win.close();
  win = open ('', 'pdfPrint', 
       'menubar=1,locationbar=0,statusbar=0,resizable=1'
       + ',scrollbars=1,width=800,height=600');
  var html = '';
  html += '<html><body onload="window.print();">';
  html += '<object width="800" height="600"><param name="' + pdf + '"><embed src="' + pdf + '"  href="' + pdf + '" width="800" height="600"><\/embed><\/object> ';
  html += '<\/body><\/html>';
  win.document.open();
  win.document.write(html);
  win.document.close();
}