Selecting media in a job with "unpredictable" structure

I am creating a Statement run as a PDF. Each customer will have a single address carrier sheet followed by an unpredictable number of detail pages. The address carrier is to be printed on plain paper (portrait) and the statements on letterhead (landscape), I can recognise which type of page each in the PDF is based on presence/absence of text in a fixed position.

In Suite, I would have created a condition and applied this in Advanced Paper Handling to select the required media. I’m not clear on how to achieve the same in Connect and would appreciate being pointed in the right direction.

In Connect you need to have different Media set up for each sort of paper you need to print on.

And each Media could be assigned properly using the print section’s Sheet Configuration property, where it’s also possible to use a script to apply a Media name.

And in the Output Creation settings you just need to map Media names to trays or printer’s media attributes.

Thank you. I can now select the required media.