I want to print some pdf file automaticaly from client pc with ASP.net. and VB.net.
My code are as follows:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim oPs As New System.Drawing.Printing.PrinterSettings Dim sPrinter As String = oPs.PrinterName Dim pathToExecutable As String = "C:\Program Files\Adobe\Reader 9.0\Reader\acrord32.exe" RunExecutable(pathToExecutable, "/t ""\\10.113.10.199\invpdf\081121_1815702_28082708_081120_HPA9233S.pdf"" ""sPrinter"") End Sub Public Function RunExecutable(ByVal executable As String, ByVal arguments As String) Dim starter As ProcessStartInfo = New ProcessStartInfo(executable, arguments) starter.CreateNoWindow = True starter.WindowStyle = ProcessWindowStyle.Hidden starter.RedirectStandardOutput = True starter.UseShellExecute = False Dim Process As Process = New Process() Process.StartInfo = starter Process.Start() Return Nothing End Function
It is working properly from Server not from client. But from client pc it cant find out the client default printer. Thats why I passed the client default printer name as a parametter and tested but it didnt work. any body can give me the solution please.
Thanks
Ishrat Jahan

New Topic/Question
Reply




MultiQuote



|