Printing Server Side from .Net (without WinForms)

百般思念 提交于 2019-12-10 19:21:58

问题


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.


回答1:


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.




回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/345224/printing-server-side-from-net-without-winforms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!