Results 1 to 2 of 2

Thread: Printing an Iframe with an embedded Google Document

  1. #1
    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

  2. #2
    Join Date
    Dec 2007
    Posts
    1,736

    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>

Similar Threads

  1. Error 76 while printing a document
    By Talleen in forum Hardware Peripherals
    Replies: 6
    Last Post: 20-06-2010, 06:15 AM
  2. Printing document with iPad
    By Captain Carrot in forum Portable Devices
    Replies: 5
    Last Post: 26-05-2010, 10:41 AM
  3. Replies: 5
    Last Post: 19-03-2010, 12:36 AM
  4. Hp 4200 gets stuck while printing multiple document
    By Adikavi in forum Hardware Peripherals
    Replies: 4
    Last Post: 10-02-2010, 09:04 AM
  5. Printing on continuous document pages with Excel
    By Waffle in forum Windows Software
    Replies: 5
    Last Post: 02-02-2010, 04:48 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,629,411.00137 seconds with 17 queries