0

I have read many post about this here on stackoverflow(most links to Microsoft are not displaying the page for help to explain this as of Jan 9 2018 ) and even did a bypassprintpreview.cs file and everything seems to work except for a few issues.

My question is what is the best practice to skip the ReportViewer and send to the default printer in a C# MVC Project.

Is this printing it to a PDF then send to the printer, Drawing it out then printing or are there NuGet packages that anyone can recommend.

Sean Schroder
  • 65
  • 1
  • 8
  • sounds like you are looking for something like this? https://code.msdn.microsoft.com/ASPNET-MVC5-AngularJS-1f18da53 using that link it'll give you the file bytes, your next step is to send the file to printer https://stackoverflow.com/questions/17448465/send-pdf-file-to-a-printer-print-pdf – Master Jan 09 '18 at 21:37
  • What printer are you talking about? - you have no access the the printers on the client machines, and printing to a printer on the server would be pointless –  Jan 10 '18 at 08:04

1 Answers1

0

I found a solution for this question in this link How to print directly without showing report viewer in rdlc report, i used this class and it work for me in Windows Forms Application and Web Application but my web application was Hosted on IIS so this did not work for me because the app was not able to access the client installed printer, so the best solution for me was in this video, I created i console application 'PrintDirect' and Registered protocol on system to access this console application and send the parameter by anchor link like this

<a href="PrintDirect:1906187">click to print order 1906187</a><br />

I hope the solution is clear