Question
Is it possible to view a PDF through an iframe that is stored in a SharePoint 2010 document library? If so, what changes do I need to make to the default document library settings?
Background
I want to display a PDF that is stored in a document library through an iframe. Currently this works without any issues when the PDF is stored in a _layouts sub-folder. When I store it in a document library I'm only given the option to save it locally. Below is the test HTML I used to validate this.
<html>
<body>
Document Library: Forces user to download the document
<iframe height="300" width="300"
src="http://sprocks/Shared%20Documents/DTest%2001test01.pdf" />
_layouts sub-folder: Renders as expected in the iframe
<iframe height="300" width="300"
src="http://devsp2:3050sprocks/_layouts/APC.trccomments/CachedReports/mwr686test01.pdf" />
</body>
</html>