wood burning stoves 2.0*
The moose likes Java in General and the fly likes Unable to print embedded word document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Unable to print embedded word document" Watch "Unable to print embedded word document" New topic
Author

Unable to print embedded word document

Eswar Rao Varthi
Greenhorn

Joined: Apr 13, 2011
Posts: 2
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.
Ankit Tripathi
Ranch Hand

Joined: Oct 17, 2009
Posts: 198
Welcome to Ranch,Eshwar.....

You can use "Object" tag of HTML for embedding the word doc in your HTML.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Unable to print embedded word document
 
Similar Threads
Lunching MS Word from jsp
Issue in Iframe
Design document
IFrame src= word document disappearing when a span/div over the iframe
Issue in Viewing and Printing Word Document in IE