Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , ,

Sponsored Links



Printing an Iframe with an embedded Google Document

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 10-11-2009
Member
 
Join Date: Nov 2009
Location: Sarasota, Florida
Posts: 3
Printing an Iframe with an embedded Google Document

Hi there,

To print an Iframe, I normally use a routine like:-

<!--<script type="text/javascript">
function PrintIframe(){
try{
var oIframe = document.getElementById('mixedtabletoprint');
var oContent = document.getElementById('divToPrint').innerHTML;
var oDoc = (oIframe.contentWindow || oIframe.contentDocument);
if (oDoc.document) oDoc = oDoc.document;
oDoc.write("<html><head><title>title</title>");
oDoc.write("</head><body onload='this.focus(); this.print();'>");
oDoc.write(oContent + "</body></html>");
oDoc.close();
}
catch(e){
self.print();
}
}
</script> -->

and then use:-
<form><input name='button1' type='button' onClick='PrintIframe();' value=' Print ' ></form>

to ctreate a button to print the Iframe.

However, this doesn't work if the Iframe contains an embedded Google document like a spreadsheet.
Google's method of embedding in a web page requires the <iframe> format.

Can anyone point me in the right direction to be able to print an iframe with the click of a button on the page?

thanks in anticipation,

regards
Allan
Reply With Quote
  #2  
Old 15-06-2011
JAMES_911's Avatar
Member
 
Join Date: Dec 2007
Posts: 1,554
Re: Printing an Iframe with an embedded Google Document

I was able to find this nice standalone viewer that might be able to help you out: http://googlesystem.blogspot.com/200...nt-viewer.html, and that can be used in this way:
Code:
  <iframe src="http://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Printing an Iframe with an embedded Google Document"
Thread Thread Starter Forum Replies Last Post
Error 76 while printing a document Talleen Hardware Peripherals 6 20-06-2010 07:15 AM
Printing document with iPad Captain Carrot Portable Devices 5 26-05-2010 11:41 AM
Hp 4200 gets stuck while printing multiple document Adikavi Hardware Peripherals 4 10-02-2010 09:04 AM
Printing on continuous document pages with Excel Waffle Windows Software 5 02-02-2010 04:48 PM
Black box when printing embedded chart to XPS PsychoMachine MS Office Support 0 26-01-2008 02:47 AM


All times are GMT +5.5. The time now is 11:29 AM.