Choose on the Fly or Set a Custom Layout per Customer

How to pre Select or Select a Custom invoice, Order or Quote layout on the fly