How to print server side table on a pdf file using asp .netSKSameer Khan11yAsked Jul 14, 2015, 3:11 AM1.4k.NET
JHJuan Hines11y agoPosted Jul 15, 2015, 3:58 AMWhat do you mean by "print to pdf file"?Do you maybe want to export a pdf file to your asp.net client?In case you do than check out this article about creating a new pdf file in C#. The article shows how to use an API from this .net's component for word documents and what you can do with its help is that you could first retrieve your table controls html content with RenderControl method and after that you can just directly convert that html content into a pdf format with C#.0
Raja T11y agoPosted Jul 14, 2015, 7:32 AMHi Sameer, Please find the attached file .This is use ful for you. Please check it. For this only send div id/class name only. for example in like below Element 2Some other random text.Print this ($.print("#ele2")) and skip the button In function like$(function() {$("#ele2").find('.print-link').on('click', function() {//Print ele2 with default options$.print("#ele2");}); Now you can print the document like pdf Thanks 0
Juan HinesPosted Jul 15, 2015, 3:58 AM
Raja TPosted Jul 14, 2015, 7:32 AM
Element 2