How to pass multiple documents in same package?
Sunday, June 7, 2020 at 06:41amHello Support,
as per requirement in my project, I have to pass multiple documents(2-3) in same package for multiple e-signing.
and after e-singing of all the parties, I have to separate out these multiple documents by category.
I am using .net SDK for this.
Class Name:
EslClient eslClient = new EslClient(apiKey, apiUrl);
Trying below method for getting individual documents.
byte[] originaldocument = eslClient.DownloadDocument(packageId, documentId);
How do I pass multiple documents in same package with multiple DocumentID?
Thanks in advance.
Reply to: How to pass multiple documents in same package?
Monday, June 8, 2020 at 11:07amHi there,
The SDK function
eslClient.DownloadDocument(packageId, documentId)
only downloads one document. To download multiple ones, there's another function allows you to download all the documents in a zip file
byte[] zippedDocuments = eslClient.DownloadZippedDocuments(packageId);
Then you can programmatically get the document by it's file name (file name is determined by the document name in package JSON and always in PDF type) There are many third-party libraries allow you to do so, in the example attached, I utilized DotNetZip.
Duo
Reply to: How to pass multiple documents in same package?
Monday, June 8, 2020 at 12:10pmHi, thanks for response.
But, my question is to how do i pass multiple documents in same package. Is there any provision in EslClient library?
Or
I have to merge all the documents into single PDF and then send this to package.
Thank you.
Reply to: How to pass multiple documents in same package?
Monday, June 8, 2020 at 02:13pmHi there,
Assuming below is the code you used to add a document:
.WithDocument(DocumentBuilder.NewDocumentNamed("Doc1")
.FromStream(fs, DocumentType.PDF)
.WithSignature(SignatureBuilder
.SignatureFor("[email protected]")
.OnPage(0)
.AtPosition(175, 165))
.WithSignature(SignatureBuilder
.SignatureFor("[email protected]")
.OnPage(0)
.AtPosition(550, 165))
)
.WithDocument(DocumentBuilder.NewDocumentNamed("Doc2")
.FromStream(fs2, DocumentType.PDF)
.WithSignature(SignatureBuilder
.SignatureFor("[email protected]")
.OnPage(0)
.AtPosition(175, 165))
.WithSignature(SignatureBuilder
.SignatureFor("[email protected]")
.OnPage(0)
.AtPosition(550, 165))
)
Simply invoke .WithDocument() function multiple times will add multiple "DocumentBuilder" object to the "PackgeBuilder" object.
Duo