0
Answer

print a pdf documnet inside a folder

oupa mosemba

oupa mosemba

16y
2.6k
1

any one who can help

Private Sub PrintDoc(ByVal fullPath As String)

Try

Dim pathToExecutable As String = "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe"

Dim sReport = fullPath.ToString 'Complete name/path of PDF file

Dim SPrinter = "HP LaserJet 5100 tn" 'Name Of printer

Dim starter As New ProcessStartInfo(pathToExecutable, "/t """ + sReport + """ """ + SPrinter + """")

Dim Process As New Process()

Process.StartInfo.CreateNoWindow = True

 Process.StartInfo.FileName = "C:\Stands.pdf"

 

Process.StartInfo = starter

Process.Start()

Process.WaitForExit(10000)

'Process.Kill()

Process.Close()

Catch e As Exception

AppendToLogFile("Error in Printing " & e.Message)

End Try

End Sub 'PrintDoc