Shailendra1801 | Posts: 18

Send multiple document with single package

0 votes
Hi, How to send multiple document with single package Id ? Thanks in Adv.

harishaidary | Posts: 1812

Reply to: Send multiple document with single package

1 votes
Hi there, Are you using the Java/.NET SDK or the REST API?

Shailendra1801 | Posts: 18

Reply to: Send multiple document with single package

0 votes
I am using .Net SDK

harishaidary | Posts: 1812

Reply to: Send multiple document with single package

2 votes

Here's an example that I've posted in a previous post (https://community.onespan.com/forum/upload-multiple-documents-package):

EslClient client = new EslClient(API_KEY, API_URL);

PackageBuilder packageToBuild = PackageBuilder.NewPackageNamed("Multiple Documents Example");

SignerBuilder signer1 = SignerBuilder.NewSignerWithEmail("[email protected]")
        .WithFirstName("Haris")
        .WithLastName("Haidary")
        .WithCustomId("Signer");

DocumentBuilder document1 = DocumentBuilder.NewDocumentNamed("Cleaning Contract")
        .FromFile("C:/Users/hhaidary/Desktop/pdf/cleaning_contract.pdf")
        .WithSignature(SignatureBuilder.SignatureFor("[email protected]")
                .AtPosition(100, 100)
                .OnPage(0));

DocumentBuilder document2 = DocumentBuilder.NewDocumentNamed("Sample Contract")
        .FromFile("C:/Users/hhaidary/Desktop/pdf/doc1.pdf")
        .WithSignature(SignatureBuilder.SignatureFor("[email protected]")
                .AtPosition(100, 100)
                .OnPage(0));

DocumentPackage packageToSend = packageToBuild.WithSigner(signer1).WithDocument(document1).WithDocument(document2).Build();

PackageId packageId = client.CreateAndSendPackage(packageToSend);

Hope this helps.


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