I have done it like this http://stackoverflow.com/a/7288883/2045854https://stackoverflow.com/a/7288883/2045854 or http://stackoverflow.com/a/11944984/2045854https://stackoverflow.com/a/11944984/2045854
Step 1: read your PDF as a stream
Step 2: pipe it to a response
Regards
Remy