You are here:

VB.NET/POS printer from remote web application in vb.net

Advertisement


Question
Hello,

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
       printDocument.Print()

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.

Answer
Joe,

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.

Regards,
Riz

VB.NET

All Answers


Answers by Expert:


Ask Experts

Volunteer


Syed Rizwan Muhammad Rizvi

Expertise

I can answers questions regarding web based and desktop based programming in VB.Net. Which can include SOAP, XML, Custom Controls, COM Interoperability etc.

Experience

Have been working in this specific area for last 2 years previously I was a VB 6 Developer with experties in other languages as well. Total 10 years of programming experience.

©2016 About.com. All rights reserved.