JimO

Is there a bug with programmatically downloading a document not completely sign?

0 votes
This works (after unzipping the file) byte[] bytes = eslClient.PackageService.DownloadZippedDocuments(packageId); using (Stream file = File.OpenWrite(DocumentName+".zip" )) { file.Write(bytes, 0, bytes.Length); } This creates a corrupt document byte[] bytes= eslClient.PackageService.DownloadDocument(packageId, docpackage.Documents[0].Id); using (Stream file = File.OpenWrite(DocumentName+".pdf" )) { file.Write(bytes, 0, bytes.Length); } Note: You can use the UI to download the document successfully Thanks Jim

Reply to: Is there a bug with programmatically downloading a document not completely sign?

0 votes
Hi Jim, I ran a quick test using your code to download a pdf document where only 1 signer out of the two signed:
byte[] bytes= eslClient.PackageService.DownloadDocument(packageId, docpackage.Documents[0].Id);
using (Stream file = File.OpenWrite(DocumentName+”.pdf” ))
{
        file.Write(bytes, 0, bytes.Length);
}
The pdf document I got was not corrupted. Can you try the following sample code and see if it works?
byte[] documentContent = eslClient.PackageService.DownloadDocument(packageId, "your_document_id");
File.WriteAllBytes(Directory.GetCurrentDirectory() + "/downloaded.pdf", documentContent);
Haris Haidary OneSpan Technical Consultant

Reply to: Is there a bug with programmatically downloading a document not completely sign?

0 votes
Hi Haris. Now, of course, it works. Still using the same code. Not sure what changed, but all looks good now. Thanks Jim

Reply to: Is there a bug with programmatically downloading a document not completely sign?

0 votes
Glad to hear it :)
Haris Haidary OneSpan Technical Consultant

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