VB.NET/POS printer from remote web application in vb.net
I am developping a web application in vb.net and print the receipt after a transaction. I import System.Drawing.Printing, System.Drawing with this code:
Dim printDocument As New PrintDocument
Dim printController As New StandardPrintController
printDocument.PrintController = printController
AddHandler printDocument.PrintPage, AddressOf PrintDocumnet_Event
In Visual Studio 2010 and launch the app, I can automatically print receipt, but When I upload the app on web serveur. The app can not detect the POS PRINTER on my computer and print the receipt.
it seems like in VS2010, the web app works like windows app. I dont know how to solve that issue.
Please any help. Thanks.
Just imagine where the code is running. The code is running on the server, hence it's trying to detect the printer on the server. If your printing is done on a LAN you may look into this: http://stackoverflow.com/questions/1174555/whats-the-best-way-to-directly-print-
Otherwise you may have to write an ActiveX or Java Applet or Silverlight or Flash code to allow you to print locally.