I created a (private, used by us in the timetable dept) alternative timetable viewing system for a college I worked at a couple of years back. This would display pdfs inside Iframes too. The code that I had was considerably shorter for embedding the pdf.
Basically, the JS would construct the following html for the pdf's iframe.
<iframe src="pdfTimetable.php?id=12345678&type=student" width="700px" height="500px"></iframe>
The underlying database has since been damaged, however I was able to test the code earlier this year with my android and desktop browsers, the behaviour was still the same as it was 2 years ago, when tested with Chrome, FF, IE 6,7,8.
Which browser(s) are you testing with?
Also, I think the term you're looking for is uploads. As in - "The below code downloads the pdf" --> "The below code uploads the pdf (to the client machine, from the server)"