Best Way to get PDF Viewer Working


Have a rails app that displays images/pdfs using a one time access code. I was using an object, embed or iframe with mixed results to display the PDFs but client is wanting more coverage through a javascript framework (pdf.js or similar).

I have tried integrating this but have ran into walls each time. The app is in heroku and stores images/pdfs in S3.

Does anyone have any advice or experience getting pdfs to render in the browser using javascript in rails?

Alternatively, are there any recommended third parties that could just do this?