Set output tray based on page size

I have a pdf that has different size pages (letter, legal and tabloid). Is there an event where I can capture the page size and set the output tray for that size when printing?

@salemantulsa

You can use PageSize property in order to determine the page size and use it accordingly to set other values. In case you face any issue, please share your sample PDF with us along with sample code snippet. We will test the scenario in our environment and address it accordingly.