1

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?

1 Answers1

1

There are various ways you can include additional documents to an existing template. If the PDF you are trying to add is something that doesn't need any added DocuSign text and signature boxes, you can create your envelope and then make another API call to attach the document to the envelope. More info here on lesson 3.

However, there might be times where the added PDF needs some text boxes and even signatures, in that case using template might not be the best option. You could consider composite templates. The Composite Templates envelope property allows you to apply multiple templates to a single envelope, combine templates with PDF forms, and combine templates with documents from cloud sources. More info here.

payamf1
  • 265
  • 2
  • 11