|
| |||||||||
| Tags: button, document, google, google document, iframe |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| 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 |
|
#2
| ||||
| ||||
| 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> |
![]() |
|
| Thread Tools | Search this Thread |
| |
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 |