I'm stuck trying to merge multiple PDFs from a template into one PDF.
The use case is, I have one template for single device data. So one pdf for one device.
A customer want to have one pdf for all devices. The structure of the data is the same, but in an array "devices".
So I would like to reuse the same template and I thought I could merge the pdf's with pdf-utils.
Here is a simplified example: https://playground.jsreport.net/w/Fredo70/7f4aA6Iv
The problem is, the context passed to the "sub-template" is the whole context. But I would need the array element that is iterated.
The result should be really the single pdf's merges together. So the total page numbers in the footer should be 1/1 on every page. See template "desiredResult".
Is this possible? Or do I have to change my approach? With "Partials" or something else?