Home > Net >  C # set printer sharing can be fulfilled? , not to set the default printer
C # set printer sharing can be fulfilled? , not to set the default printer

Time:09-29

C # set printer sharing can be fulfilled? , not to set the default printer

CodePudding user response:

Local implementation: can, put the printDocument. PrinterSettings. PrinterName="printer name" line
Shared needs: path can be like \ \ 192.168.1.100 \ HP LaserJet M1522 MFP Series photo 6

CodePudding user response:

The
refer to the original poster wzWangTank response:
c # can set the printer sharing implementation? , not to set the default printer

Local implementation: can, put the printDocument. PrinterSettings. PrinterName="printer name" line
Shared needs: path can be like \ \ 192.168.1.100 \ HP LaserJet M1522 MFP Series photo 6
See if it is help for you

CodePudding user response:

Ok, just graduated is done before this kind of project, there is a true sharing, is a kind of false sharing,
Really sharing is printer sharing, really has the network can be used,
False sharing, the user can only by the client will print files to the server, the server to print

CodePudding user response:

reference 1/f, a small monkey wu response:
local implementation: can, put the printDocument. PrinterSettings. PrinterName="printer name" line
The need of sharing: path can be like \ \ 192.168.1.100 \ HP LaserJet M1522 MFP Series photo 6


PrintDocument. PrinterSettings. PrinterName="printer name"
This is set to use the printer, not sharing Settings


I want to achieve through the code sharing, then through \ \ 127.0.0.1 \ TSC TE344 so to invoke the printer

Could not find the Shared, the method of using code

CodePudding user response:

reference it_gz_xi reply: 3/f
can, just graduated is done before this kind of project, one kind is really sharing, is a kind of false sharing,
Really sharing is printer sharing, really has the network can be used,
False sharing, the user can only by the client will print files to the server, the server to print


The specific? Can use the code implementation

CodePudding user response:

Can, did you see the PrintDocument object, if there is no API call system,

CodePudding user response:

reference 6 floor XBodhi. Response:
ok, did you see under the PrintDocument object, if there is no API call system,


PrintDocument: no, I am using ZPL commands, and then sent to the Shared printer
PrintDocument Shared in setting

API is specific system, set up Shared printer

CodePudding user response:

 https://blog.csdn.net/zlyperson/article/details/12484

CodePudding user response:

reference XBodhi. The eighth floor response:
 https://blog.csdn.net/zlyperson/article/details/12484 


This is to obtain share printers, is not set,
I want to achieve is to set up printer sharing

CodePudding user response:

https://www.pcreview.co.uk/threads/share-a-printer-from-the-command-line.1735170/

Reference, using CMD Shared printer

CodePudding user response:

https://www.codeproject.com/Articles/80680/Managing-Printers-Programatically-using-C-and-WMI

CodePudding user response:

CMD command
//set the printer share name is 123 print name 
Rundll32 printui. DLL, PrintUIEntry/Xs/n "123" Sharename "123"
//set the printer share is 123 print name
Rundll32 printui. DLL, PrintUIEntry/q/Xs/n "123" Attributes Shared
  •  Tags:  
  • C#
  • Related