esigntest

How to pass multiple documents in same package?

0 votes

Hello 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?

0 votes

Hi 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

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Attachments

Reply to: How to pass multiple documents in same package?

0 votes

Hi, 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?

0 votes

Hi 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

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off