Apr 12, 2010
I am trying to implement a custom printing solution for a client. What he wants is to have one button print a certain set of info to a specific printer and specific printer tray, connected to the client machine. Another button will print a similar set of info, to the same printer, but a different tray.
View 5 Replies
One tray is preloaded with regular 8.5"x11" paper, and the other is loaded with legal paper, 8.5"x14". I've found some instructions on how to do this: [URL]. So, I've implemented the code, and am able to enumerate the printers attached to the client machine, and their trays.
I've setup some web.config settings for the client to enter the names of his printer and specific trays (in this case, tray 1 and tray 3). This code I've written runs and works correctly, printing the document without error. The problem I am having is that even though I have selected the tray for legal paper, all the info instead prints on regular paper, the printer seems to be ignoring my instruction to print onto legal paper.
Here is the code:
Private printFont As Font
Private ds As dsSummons
Private formToPrint As FormType
I first tried "pd.DefaultPageSettings.PaperSource = PSource" but that didn't seem to work. I also tried setting "pd.PrinterSettings.DefaultPageSettings.PaperSource = PSource" but that doesn't seem to work either..