Trying to print an iFrame embedded spreadsheet
-
Hi
I use an embedded (iFrame) Excel spreadsheet as a specialized calculator on a web page. The calculator allows users to capture some information, and see the result.
I’m trying to allow the user to print its scenario.So far nothing worked, and then…the light : Print-O-Matic Version 2.1.10 ??
I know that it is simple, but I had no success so far. The preview page doesn’t display the sheet.
First question: should the plugin work when trying to print the content of an iFrame with an embedded spreadsheet ?
Second question: I can either use iFrame or Java script code to bring the sheet on the web page. Should it work also with Java script ?
Here is the code (the “scripts” were for trying things):
<div id="print_target">This is the simple print target for the page [print-me target="#print_target"] <iframe id="biq" width="402" height="346" frameborder="0" scrolling="no" src="https://bitumequebecorg.sharepoint.com/sites/BiQ2/_layouts/15/Doc.aspx?sourcedoc={452dbd74-22e5-40c8-8808-81ec80fa6b5a}&action=embedview&wdAllowInteractivity=False&wdHideGridlines=True&wdHideHeaders=True&wdDownloadButton=True&wdInConfigurator=True&wdInConfigurator=True&edesNext=false&resen=true&ed1JS=false"></iframe> </div> <button onclick="printBiQ()">Print iframeBiQ</button> [print-me target="biq"/] <script> function printBiQ() { var iframe = document.getElementById('biq'); var iframeWindow = iframe.contentWindow; iframeWindow.focus(); iframeWindow.print(); } </script> <iframe id="myIframe" src="https://guignoleerivesud.org/atestforiframe/"></iframe> <button onclick="printIframe()">Print iframex1</button> <button onclick="printIframe2()">Print iframex2</button> [print-me target="myIframe"/]
Thanks
GastonThe page I need help with: [log in to see the link]
- The topic ‘Trying to print an iFrame embedded spreadsheet’ is closed to new replies.