Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Use Base64 encoding to send PDF files or images in a SOAP message

Updated on August 24, 2021


A developer asks: We want to send a SOAP request to our Process Commander application that will call a service.  Our application then needs to create a PDF form (filled in with the value of properties received in the SOAP request), and send the resulting PDF document to the caller in the SOAP response. 

The PDF document, created by eForm rules, is stored in the pyEForm property, which is of mode Java Object

What is the recommended way to return this PDF document as the SOAP response?


Suggested Approach

Property pyEForm holds the binary image of the PDF file. You need to make a Base64-encoded version of the image to send as characters over SOAP.  Speaking strictly, you need to text-encode it; and Base64 is the recommended technique. 

The receiving application needs to decode it, and then it would be back to the binary image of the PDF.

For an example of Base64 encoding, review the standard activity Work-. AttachEForm, which calls PublicAPI methods in to perform such encoding.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us