How to group repeated products from a table in a custom printing format?

See below :