Convert PDFBytes node content to PDF File Docusign

Viewed 208

I am using Webhook of DocuSign to track the changes of Envelopes. But I cannot convert from the PDFBytes node content into a pdf file. I did follow the example from DocuSign but all of what I get is the file with all of the text in that node.

This is an example: https://github.com/docusign/recipe-010-webhook-csharp/blob/master/Webhook/Controllers/WebhookController.cs

Even I try to open the file with pdf extension it will show cannot open this file.

Does anyone know how to treat with PDFBytes Data Type? I try to convert from Base64 but still wrong.

1 Answers

The notification message's PDFBytes are Base64 encoded.

So you need to:

  1. Pull out the PDFBytes data from the notification message. (It's text at this point.)
  2. Base64 decode the data into a binary run of bytes.
  3. Store the binary data into a binary-type of file.
Related