Open document in web view for iOS

I recently came across the scenario were I had to open some pdfs that came with the application. I didn't want to use the UIDocumentInteractionController class for this so I stumbled upon some forum posts that showed me how to do it using a UIWebView. It turns out that UIWebView can support a range of media files: