Click here to Skip to main content
16,020,347 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am creating a web application which has to communicate to a Datamax label printer connected to the shared network. How can I connect to the printer using its IP address and get print of label? I am using C#.

Please help me.
Posted
Updated 24-Nov-10 7:43am
v2

Hi,
I use this one . It`s very simple buit it works OK .

1. create file print.bat with : print /D:\\servername\printername\\location\print.txt inside .
2. in code a use:
Process proc = new Process();
proc.EnableRaisingEvents = true;
Process.Start("\\print.bat");
proc.Close();
 
Share this answer
 
Comments
Espen Harlinn 30-Jan-11 15:40pm    
Good enough, but I think the OP needs to know more about setting up the user configured for IIS to make it work for him :)
i.rabek 30-Jan-11 16:01pm    
Or try following :
Map Datamax network share into LPT1 and then use SHELL command to copy label to LPT1 .
i.rabek 26-Jul-11 7:36am    
Hi try this : Labels are printed OK .
http://www.codeproject.com/KB/windows/mobilelpr.aspx
i try it and its not working !
 
Share this answer
 
Comments
i.rabek 12-Aug-11 7:24am    
show your code , or check settings on Datamax . Must be LPR . This : http://www.codeproject.com/KB/windows/mobilelpr.aspx is very good .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900