-1

How can I print PDF directly to a printer with (asp.net) C#?

I actually want to print the PDF directly without showing a dialog on the server side in asp.net c#

Marleen Schilt
  • 650
  • 15
  • 26
user1253125
  • 66
  • 1
  • 6
  • do you ever try rdlc report? – dada Jul 15 '15 at 07:33
  • possible duplicate of [How can I send a file document to the printer and have it print?](http://stackoverflow.com/questions/6103705/how-can-i-send-a-file-document-to-the-printer-and-have-it-print) – vidriduch Jul 15 '15 at 07:37
  • Not a duplicate, that thread concerns local Printing from a WinForms application, this one concerns Printing via ASP.NET. – JaggenSWE Jul 15 '15 at 07:39
  • 2
    Forget it, there's no way you can bypass the browser print dialog. And for good reason too. I wouldn't want my printer to start spitting out random spam messages when I visit a web site. – Marnix van Valen Jul 15 '15 at 07:51

1 Answers1

1

You'll be hard pressed to make this from asp.net if the server isn't residing in the same LAN as the client and can have the same printers installed, this due to security functions inside the web browsers not allowing websites to print to a local machine. You might get a solution for this if you implement some ActiveX Component or Java applet to run this (even seen it in Silverlight, but that's going away).

Something like http://www.vbgold.com/index.shtml#AdvancedPDFPrinter might help you achieve what you're looking for.

JaggenSWE
  • 1,950
  • 2
  • 24
  • 41