Do you want to generate 1 document per product or Print all the products in 1 document?
Scenario 1: All products in 1 document as line items then it should be fairly easy.
Scenario 2: 1 page for product, then you must see if you can create 1 page for every product within 1 document. This is also bit similar to Scenario 1
Scenario 3: 1 document per Product created in 1 microflow, you can make it, but you will be not presented with all downloads. You may create a page that shows the list of documents generated from where you can download. This is scenario 1 in loop with every product (or queued)
Scenario 4: Generate multiple documents per product, zip it and download as 1 file
I dont have working microflow for scenario 3, but if I am doing this for the requirement you mentioned I would atleast plan to do it like below
- Create a document template that can print 1 product as per your requirement
- In the print microflow, get all the products in the screen. you can use the same datasource that is on the page
- Use iterator to go over each product
- Generate the document for every product and save it (you dont have to add download option)
- You have one more entity called Shipment (use some unique identifier for this print) and associate all Printed documents to it
- Have a page and show the relevant documents for the shipment
NOTE: This is a basic implementation, we can also use queue module to process the document generation in the back end, for which the logic is mostly same but you need to know the queue module.
For generating document refer: https://docs.mendix.com/refguide/generate-document