I have been working on a listener application for receiving HTTP POST requests from DocuSign Connect. It is coded as a ASP.NET MVC4 web application.
By using the sandbox environment, I have been able to send and receive documents in a variety of different file formats with the expected behavior outlined by DocuSign...except for docx types.
The scenario I am encountering is as follows:
- Attach and send a test docx file for signing via the "send envelope" interface in the sandbox environment (for simplicity, I am just adding a signature overlay).
- Logged into the recipient email account and go through the steps of signing the document.
- Wait a few minutes for the listener application to respond and extract the signed document from the XML.
- Verified that the filename of the extracted signed document is not a PDF, but the same as the uploaded file (name and file extension). Attempting to open it in Word results in Word complaining that the file is corrupted and cannot be opened.
- When checking for the same signed document (as an attachment) in the "completed" email notification, I see it as a PDF and was able to open it with no issues.
My question is why is DocuSign Connect not returning a signed PDF version of the docx file that was sent?
DocuSign's documentation has indicated that signed versions of any file format will be in PDF. As verification, I had tried using doc and jpg files with no issues.
What makes this even more strange is that if I manually change the file extension of the signed document to PDF, I can view the contents of the file as expected. So is it just a case of an incorrect file extension being returned back? Or is there a step or two that I am missing?
I have attached the XML from a couple of requests from DocuSign Connect. One is correct with no issues; and one that is problematic.
Correct XML from DocuSign Connect (Files Sent: 1 PDF, 1 doc)
Problematic XML from DocSign Connect (Files Sent: 1 docx)
If anyone knows why this is happening, I would appreciate any help I can get. It's not a deal-breaker that this is happening, as I can program in an exception to rename the file extension for docx files. It is just a minor annoyance that it has to be done.