Printing Server Side from .Net (without WinForms)

2019-07-02 03:28发布

Hey printing junkies need some pointers to send me in the right direction for this development.

I am developing an epos system for a local shop which we are later going to tie into an ecommerce site.

The front end of the epos system is going to be WinForms so we can handle USB devices easily and we are going to use a WebForms/MVC admin console.

One area we are inexperienced in is printing. We need to print barcodes, and wish to do this via the admin console (web based).

So (finally) the question. Where do we start looking for code that will allow us to print directly to a connected printer from the server (IIS) instance of .net from the webforms.

3条回答
淡お忘
2楼-- · 2019-07-02 03:40
System.Drawing.Printing

http://msdn.microsoft.com/en-us/library/system.drawing.printing.aspx

Creating the document is a lot like creating a dynamic image. I have not actually sent a document to the printer from a web app, but I don't see why you couldn't.

查看更多
混吃等死
3楼-- · 2019-07-02 03:56

Your Web app will probably have to use remoting to connect to a Windows service running on the same machine (or pick your favorite IPC mechanism—perhaps a queue in a database). This service can run in an full trust context and should be able to print for you.

查看更多
ら.Afraid
4楼-- · 2019-07-02 04:00

You can set up a local printer, that just passed traffic through to the network printer. This is easier to set up that printing direct to a network printer. See link text

查看更多
登录 后发表回答