So you know how when you go to Mailings in MS Word and you go to print an envelope. When you print that envelope the printer knows to pull from the bypass tray based on the envelope.
This cannot be accomplished in code, however, is there a way to set the properties, by page, to print from the correct tray?
What I am trying to accomplish is to print the first page normally (8 1/2 x 11) and the second page (a manilla envelope in the bypass tray)
Is this possible?
Yes, it's possible. Use this code to tell the printer to select the paper tray based on the page size:
var pp = this.getPrintParams(); fv = pp.constants.flagValues; pp.flags = pp.flags | fv.setPageSize; this.print(pp);
I'm not sure how to modify this and I am not having any luck.
Is there a way to just make the first page print from tray 1 and the second out of tray 2?
Using a script? Only if each tray is defined as its own printer.
I'm not sure how I would accomplish that. I will have to dig into the printer settings and see if there is an option. Can you give me a completed example of the code above so I can figure out how to change it to match what we are using?
The code above is complete. It will send each page to the tray that matches its paper size.
Well that would be why my changes were not working. Do I set this as part of the file itself or attach it to the print button?
As a part of a button.