Skip to content Skip to sidebar Skip to footer

PostMessage To PDF In An IFrame

Here's my situation. I had a webpage with an embedded PDF form. We used a basic object tag (embed in FF) to load the PDF file like this:

Solution 1:

For Internet Explorer, use:

<object id="pdfForm" type="application/pdf" data="yourPDF.pdf"></object>

For Firefox, use:

<embed id="pdfForm" type="application/pdf" src="yourPDF.pdf"></embed>

Solution 2:

you can also gain access to the embed object with this

var emb = document.getElementsByTagName("EMBED")[0];

but you'll be running that code from the containing page so get a reference to the iframe instead of just calling it on document.


Post a Comment for "PostMessage To PDF In An IFrame"