Support Article
PDF Binary stream's REST response is corrupted
SA-86126
Summary
A REST Connector is used to receive a binary stream with a PDF document in the response. While converting the stream to PDF, a blank document is generated.
Error Messages
Not Applicable
Steps to Reproduce
- Create a REST Connector.
- Configure the POST method to receive the binary stream of the PDF in the response and map it to a Text property.
- Use the out-of-the-box base64encode function to generate the base64 string.
- Generate a PDF from the generated string.
Root Cause
Incorrect headers were sent with the response.
Resolution
Perform the following local-change:
Modify the headers to be sent as below:
Content-Type: application/octet-stream; charset=UTF-8
Content-Disposition: attachment; filename=some_name.pdf
Published August 15, 2019 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.