Natavia Finnie
asked on
How to use Multi-threading process for printing
I am not very familiar with multi-threading. I need help with multi-threading the ProcessStartInfo for printing to allow my .pdf files that I send to the printer to print in order. I feel that if I use multi-treading that it would allow me to print larger pdf files in the particular order that I need.
Currently was the print jobs get to the printer they tend to print off by size. I have some pretty large pdf file...
I also need to print on one side of paper. The printer is defaulted to double-sided. I want to print one-sided only for these documents...
Currently was the print jobs get to the printer they tend to print off by size. I have some pretty large pdf file...
I also need to print on one side of paper. The printer is defaulted to double-sided. I want to print one-sided only for these documents...
For x As Integer = 0 To enclosureList.Count - 1
Dim psInfo As New ProcessStartInfo
With psInfo
.UseShellExecute = True
.Verb = "print"
.FileName = enclosureList(x)
.WindowStyle = ProcessWindowStyle.Hidden
Process.Start(psInfo)
End With
Next
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I hadn't understood you had that code called on several lists.
It's the whole code which you must put inside the Thread, not just the printing of one list.
It's the whole code which you must put inside the Thread, not just the printing of one list.
ASKER
your code worked as for as building with no errors but the order that it prints is way off. each enclosureList may have anywhere from 2 to 8 pages of enclosures including the attached word file that is a cover sheet that I insert at enclosureList(0) and then the following enclosures should follow. It is now printing (0) in-between the next enclosureList.
I placed your code at the very end of my print sub...
Should I be calling this sub differently?