Hi,
if you access the file in through an OData service implemented by an ABAP system,then you need to implement the get_stream method in your data provider class extension and set the content type application/pdf. If you want to proceed this way,just let me know and I can help you in further. You need to create a project in SEGW transaction,create an entity and redefine some methods to expose the pdf to a client...
Attach_file_TO_RESPONSE above works only in ABAP wd and FPM stateful applications,but nothing to do with OData.
Attila