I was wondering if it is possible to print object tag data in html? For example, I have an object like this:
<object id="myObject" data="myPDF.pdf"></object>
I have a PDF embedded in an object tag. I need to be able to print PDF using the JavaScript function in Firefox. Placing a PDF in an iframe and printing do not work, because Firefox will not allow you to access the contents of the frame. Also not used:
myObject.contentWindow.print();
or
document.getElementById("myObject").print();
Does anyone have any other suggestions? I am trying to figure out a way to print only object data (i.e. a PDF file), but have not yet found a solution. Using iframe works for chrome and using embed tag works for Internet Explorer, but I can not find anything that will work in Firefox. Any help is much appreciated, thanks.
source share