Group orders on the packing slip by product tags

Hi people,

Wanted to know if it is possible to group orders by product tag meaning

Original order would be :

Apple (tag fruit)

Cucumber (tag vegetable)

Tomatoes (tag vegetable)

Orange (tag fruit)

Salad (tag vegetable)

Order when printed should be :

Apple (tag fruit)

Orange (tag fruit)

Cucumber (tag vegetable)

Salad (tag vegetable)

Tomatoes (tag vegetable)

Is this possible or should I think of a different system to achieve this ? SKU ? Product description ?

Thanks

Michael