How do i print a pdf document using javascript or jquery in Asp.net -
below code used doesn't print pdf file.
<script type="text/javascript"> function callprint() { var pages = 'pdf url'; var owindow = window.open(pages, "print"); owindow.focus(); self.print(); owindow.close(); return false; } </script>
you can try following code. since page(which linked callprint function) pdf format(i assume?), browser open built in print feature , able print out pdf doc
$(document).ready(function() { function callprint(){ window.print(); }; });
you have bind callprint function click function on button link...eg.
<a href="callprint()">print pdf</a>
Comments
Post a Comment