How to print PDF directly to printer in ASP.NET
Posted on 2004-08-05
What I really need to do is print a report done in SQL Server Reporting Services directly to printer but it doesn't have a print option. So what I did was export the report to a PDF file then print it directly to a printer.
I had this working before with this code:
Dim FileName As String = "c:\InetPub\wwwRoot\HSAdminDev\PDFReports\BarCodes.PDF"
Dim p As New System.Diagnostics.ProcessStartInfo
p.Verb = "print"
p.WindowStyle = Diagnostics.ProcessWindowStyle.Hidden
p.FileName = FileName
p.UseShellExecute = True
Catch ex As Exception
PrintSuccessMsg = ex.Message
It suddenly stopped working and couldn't get it to work again. It also opens up a process for adobe acrobat, but nothing happens.
Anyone knows of another method of printing a PDF file directly to printer in ASP.NET?