简体   繁体   中英

How to send a fixeddocument to a network printer using WCF (C#)?

I have a client application in WPF that is using WCF services. I am completely new to WCF services.

In the WPF client I have a fixed document that I wish to print to a specific network printer. The printer is a stand-alone printer connected directly to the network.

How do I send a document to a printer using WCF services? (or is there a better way?)

(The WCF is located on the client machine. This is not a web page and nothing I've read addresses this simple question).

Thank you for any help or direction (I'm at a loss where to start).

The way to achieve really depends on the way you can interface with the printer.

  1. Find documentation for the printer and see if that allows you to print to it directly. For eg http://en.wikipedia.org/wiki/HP_Open_Extensibility_Platform_(OXP)#Device_Service_APIs

  2. Install the correct printer drivers on the client machines and select that driver. That's the approach that we use in our applications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM