I think, you can make a pdf to print if browser has plugin which offers print api.
or alternatively, inject printable html into ur page and make it print.
You would have better luck in a windows form forum since this is for asp.net web development and there really aren't any printing methods suitable for web-based pdf printing and they wouldn't transfer to a windows form anyways.
Your best spot to ask would be: http://windowsclient.net/Forums/ Because PDF documents will need something such as Adobe Reader to read them, or another component, you could try just executing the pdf reader
as a new process and pass in command-line parameters for printing a pdf document. Here is a sample of instructions on this approach:
http://www.ehow.com/how_7225910_print-pdf-command-line.html
Don't forget to mark useful responses as Answer if they helped you towards a solution.
Marked as answer by Qi Wu - MSFT on May 21, 2012 02:21 AM
You would have better luck in a windows form forum since this is for asp.net web development and there really aren't any printing methods suitable for web-based pdf printing and they wouldn't transfer to a windows form anyways.
Your best spot to ask would be: http://windowsclient.net/Forums/ Because PDF documents will need something such as Adobe Reader to read them, or another component, you could try just executing the pdf reader
as a new process and pass in command-line parameters for printing a pdf document. Here is a sample of instructions on this approach:
http://www.ehow.com/how_7225910_print-pdf-command-line.html
thanks for the link. i am about to ask there. thanks for your help.
pchindhade
Member
97 Points
93 Posts
How to print pdf file on click of button in C# project.
May 09, 2012 11:51 AM|LINK
hi
i have c# application about hotel management system. i have done with all the things.
even i have created pdf file using iText library but now problem is in printing that pdf.
i am not able to generate any code to print this created pdf. please provice me some links. or any idea.
thanks in advance.
raju dasa
Star
14320 Points
2440 Posts
Re: How to print pdf file on click of button in C# project.
May 09, 2012 12:49 PM|LINK
Hi,
I think, you can make a pdf to print if browser has plugin which offers print api.
or alternatively, inject printable html into ur page and make it print.
check these sites:
http://stackoverflow.com/questions/205180/how-to-print-a-pdf-from-the-browser
http://www.bennadel.com/blog/1591-Ask-Ben-Print-Part-Of-A-Web-Page-With-jQuery.htm
rajudasa.blogspot.com || blog@opera
pchindhade
Member
97 Points
93 Posts
Re: How to print pdf file on click of button in C# project.
May 09, 2012 12:54 PM|LINK
thanks for your reply but,
i wrote application not web site. its a hotel management system not website. how could i make my winform application to print iText pdf file.
markfitzme
Star
14319 Points
2215 Posts
Re: How to print pdf file on click of button in C# project.
May 10, 2012 04:26 AM|LINK
You would have better luck in a windows form forum since this is for asp.net web development and there really aren't any printing methods suitable for web-based pdf printing and they wouldn't transfer to a windows form anyways.
Your best spot to ask would be: http://windowsclient.net/Forums/ Because PDF documents will need something such as Adobe Reader to read them, or another component, you could try just executing the pdf reader as a new process and pass in command-line parameters for printing a pdf document. Here is a sample of instructions on this approach: http://www.ehow.com/how_7225910_print-pdf-command-line.html
pchindhade
Member
97 Points
93 Posts
Re: How to print pdf file on click of button in C# project.
May 10, 2012 09:05 AM|LINK
thanks for the link. i am about to ask there. thanks for your help.
amit.jain
Star
11225 Points
1815 Posts
Re: How to print pdf file on click of button in C# project.
May 10, 2012 09:14 AM|LINK
Hi you can use printdocument class to print winforms
refer http://csharpdotnetfreak.blogspot.com/2012/06/print-datagridview-winforms-c-vbnet.html for more info
amiT jaiN
ASP.NET C# VB Articles And Code Examples