Download PDF from Binary Data


I have a Crystal Reports extension that outputs an array of bytes with the report in pdf format.
In Service Studio 5.1, I pass the extension output (Binary Data) to the Download element property "File Content". Then I set the filename to "Something.pdf" and mime type to "application/pdf".
But, after downloading the file from the eSpace, Adobe Reader always says that the file is corrupted and cannot repair it.

I've tried the same extension code with a Visual Studio web application and I can write the stream to the response (wich will try to open the file directly in the browser) and I can also save to a PDF file. From this web application the PDF can be opened with no problems with Adobe Reader.

Am I doing something wrong on Service Studio? It's a platform limitation? What can I do to get a valid PDF from Outsystems?


I had this same problem when creating ZIP-files for download. As far as I know, it only occurs in Internet Explorer when using Active Server Pages.
My problem was solved by changing the mime-type back  to "application/octet-stream".

Kind regards,

I'm using Google Chrome and I've already tried "application/octet-stream" mime type, but the result is the same :\