C# .NET - Selecting a printer dynamically and sending a pdf to print in that sel

Asked By Eddy Lino on 15-May-12 10:22 AM
Earn up to 10 extra points for answering this tough question.
I need to select a printer at runtime and send the pdf to the selected printer
[)ia6l0 iii replied to Eddy Lino on 15-May-12 10:34 PM
C# or .Net does not have native support for this. You need to either invoke commands on Adobe PDF reader or use third party components like Aspose or GSPrint

Or you could try this technique. 

Get the list of installed printers from the PrinterSettings.InstalledPrinters and show them in a dropdown. This is available in the System.Drawing.Printing namespace. And then drop the pdf to the print folder of the chosen printer. For the latter, the code samples can be found at http://geekswithblogs.net/bleepzter/archive/2008/10/09/printing-a-pdf-file-to-a-network-printer-with-c.aspx

Hope this helps.
Eddy Lino replied to [)ia6l0 iii on 16-May-12 03:17 AM
I want to select a printer from my network ... I need to give the name in my code .... Ant help...