I am developing an application which downloads pdf files, then water marks and then print. Downloading part is completed using internet controls and water marking also done using itextsharp dll. With the following code I am able to set the printer also.
Public Function SetPrinter(ByVal prtName As String) As Boolean
Dim s As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
Dim m As Microsoft.Win32.RegistryKey
m = s.OpenSubKey("Software")
m = m.OpenSubKey("Microsoft")
m = m.OpenSubKey("Windows NT")
m = m.OpenSubKey("CurrentVersion")
m = m.OpenSubKey("Windows", True)
m.SetValue("Device", prtName & ",winspool,FILE:")
m.Flush()
m.Close()
s.Close()
End Function
But when it comes to pdf printing its causingproblem becoz I have to print multiple documents. I used AxAcroPDF viewer to print but next line is executed before the print command completes. I dnt want to make my code bulky using sleep or timer command. Is there any good way to print multiple pdfs with page select (like age 1 -5).
Thanks/Regards
SGM