Output PDF to CAF screen


We have a service that uses java librairies to create a PDF document dynamically. What we want to do is not save the PDF to the filesystem and output it directly to a CAF screen and then the user can do whatever they want with it.

Currently, I am able to safe the output stream as a local file on the IS and the pdf is created but when I’m not sure what to do so that the output (can be bytes or stream) is sent to a CAF page.

I did find a few threads on this, but they relate to using a file that already resides on the file system rather than in memory.

Any help would be appreciated.