0
votes

I am trying to connect docusign with my java application and I was successful.

I have created listener to listen response of docusign after user complete sign process so that document saved/updated automatically in my system.

I am able to get that response in xml format with pdfbytes but as soon as I create pdf from that pdfBytes,I am not able to opening that pdf(might be corrupted pdfbytes).

I am making base64 decoding of that byte before generating pdf.

1

1 Answers

0
votes

This is a common problem when the pdfbytes are not managed as a run of binary bytes. At some point you may be treating the data as a string. The PDF file becomes corrupted at that point.

Issues to check:

  • When you Base64 decode the string, the result is binary. Is your receiving variable capable of receiving binary data? (No codeset transformations.)
  • When you write your binary buffer to the output file, check that your output file format is binary clean. This is especially an issue on Windows systems.

If you're still having a problem, edit your question to include your code.