B
Brad Pears
I have the following code which I was using to print .pdf's. It worked fine
and actually printed the pdf file.
Now I want to use the same code to print a .jpg file. When I run the code,
it launches the 'Windows Picture and Fax viewer application' and DOES NOT
print the actual image.
Is there a tweak to this code or is there some other code I can use to print
a specified .jpg file directly from within my .net application???
PS.. I hardcoded the image name in here for testing purposes only and I am
simply using teh default printer.
Here is the code..
--------------------------------------------------------
Dim iCopies As Integer
Dim x As Integer
' Ask user for number of copies they want printed
iCopies = CInt(InputBox("Number of Copies: ", "Print Steel Plate Drawing",
"3"))
Dim psi As New ProcessStartInfo()
For x = 1 To iCopies
With psi
..Verb = "print"
..WindowStyle = ProcessWindowStyle.Hidden
..FileName = "C:\image.jpg"
..UseShellExecute = True
End With
Process.Start(psi)
Next x
Thanks, Brad
and actually printed the pdf file.
Now I want to use the same code to print a .jpg file. When I run the code,
it launches the 'Windows Picture and Fax viewer application' and DOES NOT
print the actual image.
Is there a tweak to this code or is there some other code I can use to print
a specified .jpg file directly from within my .net application???
PS.. I hardcoded the image name in here for testing purposes only and I am
simply using teh default printer.
Here is the code..
--------------------------------------------------------
Dim iCopies As Integer
Dim x As Integer
' Ask user for number of copies they want printed
iCopies = CInt(InputBox("Number of Copies: ", "Print Steel Plate Drawing",
"3"))
Dim psi As New ProcessStartInfo()
For x = 1 To iCopies
With psi
..Verb = "print"
..WindowStyle = ProcessWindowStyle.Hidden
..FileName = "C:\image.jpg"
..UseShellExecute = True
End With
Process.Start(psi)
Next x
Thanks, Brad