简体   繁体   中英

Print pos receipt using javascript and c#

I wonder is there any way to print the pos receipt through javascript and c# mvc, the most important condition is cannot redirect page or refresh the current page. I cannot find any reference online, anybody can suggest me? Or javascript totally cannot done something like this? I do not want to use print.js cause it will pop out a page and let user to choose which printer to use.

Short Answer: No.

When you want to print something in a browser, well you may use different approaches like window.print() however no matter which method you do, finally you are just asking the browser to do the print (sending the print command), so it is something that depends on browser and if it insists on showing print options before printing, you can do nothing about it and you can not go beyond what it gives access to you, and what it doesn't.

So this is something related to how the browser functions and its limitations and has nothing to do with javascript or c#.

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