Click here to Skip to main content
15,896,428 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I need to print a Receipt which is generated by Rotativa as partialview as pdf, I would like to print the reciept generated as pdf directly to the default printer connected to the system ( Say Thermal Printer) Kindly help me to do it, the .pdf will be generated each time.

What I have tried:

I used Window.print it prints the current page and has a dialogue box. I need the pdf page to get printed as a receipt in the default printer connected to the system.
Posted
Updated 12-May-17 3:27am

1 solution

You can't.

In order to print to the client's printer, the browser will always display a dialog box. There is no way around that.

(Imagine how happy the printer ink cartridge sellers would be if every random website you visited was able to print things to your default printer without confirmation!)
 
Share this answer
 

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