Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
creating a eCommerce website and need to print bill receipt using ESC/POS printer. Help me how to print in c#?

What I have tried:

I tried a lot but tell me how to send command of a printer while print.
Posted
Updated 10-Sep-18 22:21pm
Comments
F-ES Sitecore 11-Sep-18 4:39am    
A printer attached to the webserver or the user's machine?
Pahi2317 11-Sep-18 5:26am    
Printer attached to the user's machine
F-ES Sitecore 11-Sep-18 5:37am    
You can't print to the user's machine from asp.net as your .net code runs on the server and has no access to client hardware. All you can do is show them the image of the receipt or the document or whatever and they will print it off themselves.

1 solution

Look at using a PrintDocument[^] - the link includes a basic example.
 
Share this answer
 
Comments
Richard Deeming 11-Sep-18 12:08pm    
Trouble is, you can't call that from Javascript, and you can't access the user's printer from the server. :)
OriginalGriff 11-Sep-18 12:20pm    
Ah ... another one that doesn't know where what executes. :sigh:

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