I am facing problem while printing word document embedded in html page. I have taken an iframe and displaying in web page with innerhtml. Here is the code snippet.

var txt="<iframe width=100% height=100% frameborder=0 ";
txt=txt+"src="+sourceurl+"></iframe>";
document.getElementById("default").innerHTML=txt;

When I tried to print the word document it is taking as whole web page and not printing that word document whereas pdf document is getting printed properly. Is there any other way to embed the document in html page apart from the innerhtml? Please help me.