


I found some differences in the content of base64 when I compare the result of this script, with the result from a REST client which converts automatically to base64.ĭoes anybody know how to resolve it? Or is there any other way to convert it using other scripts or policies?Įncodedfile = base64.b64encode(flow. I am using a python script to convert the ntent to base64, which I found being used in some other SAP policies, but the conversion is not working fine.Īfter decoded in portal, the pdf does not open properly. The service in Gateway is returning a pdf file(see below the ntent) and I need to convert it to base64 before send the response to Portal in json format.

This pdf file needs to be download from portal side. I am working on integration between Portal -> SAP API Management -> SAP Gateway and for one specific service, I need to retrieve the PDF file from Gateway.
