I'm trying to write code that will generate PDFs for users using docusign. A lot of the PDF is static, and won't change per user. There is a page in the middle (the smallest PDFS will be 3 pages) that will have dynamic length and may end up requiring additional pages.
My question is if I have a template for the PDF and just need to duplicate the second page multiple times, is it possible to do this using a predefined template and then adding the extra pages using PHP and the docusign SDK? I have been trying to figure out how to do this, but I've been unable to find a way or any documentation on doing it. I do have a script that generates the embedded link for a PDF using the template from PHP, but I've been unable to figure out how to add additional pages (or modify the pages from the template).
If this is not possible, would the best way to do what I need to do be to just generate the whole PDF using code and not use a template at all?