ganiganesh Report post Posted July 9, 2012 Hi Team, My requirement is that i have around 7 charts in one div for which i need to provide print option. if i open it in new window i would be getting only static content but not charts so i need to pass fusioncharts.js file in javascript function itself as below function PrintDiv() { var divToPrint = document.getElementById('print_content'); var head="<html><head><script language='JavaScript' src='../content/jscript/charts/demo/FusionCharts.js'></script></head><body onload='window.print()'>"; var popupWin = window.open('', '_blank', 'width=1300,height=300'); popupWin.document.open(); popupWin.document.write(head+divToPrint.innerHTML + '</html>'); popupWin.document.close(); } but getting script error so please suggest how can i provide print option for the only body of html in which i m displaying 7 charts (please find the attached image) thanks in advance Ganesh Kumar CH MyCharts.bmp Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted July 10, 2012 (edited) Hi, With regard to your query, to print the charts, FusionCharts provides advanced print management by FusionCharts JavaScript Print Manager Class. You will just need to add a single line of code in JavaScript which enables Print Manager for all the charts present in a web page. Ref. Code: FusionCharts.printManager.enabled(true); Could you please try by using this line of code and try printing the whole page from browser's File → Print menu or from JavaScript's native window.print() function? Awaiting your response ! Edited July 10, 2012 by Sashibhusan Share this post Link to post Share on other sites
ganiganesh Report post Posted July 10, 2012 HI, if i use printManger do i get only chart content in same way as it appears in my web page with out menu tab? and also i have tried batch export as a image/pdf for my web page which contains 7 charts but my concern is that not getting charts how it appears in my webpage, getting in sequence of source charts please advice me... Hi, With regard to your query, to print the charts, FusionCharts provides advanced print management by FusionCharts JavaScript Print Manager Class. You will just need to add a single line of code in JavaScript which enables Print Manager for all the charts present in a web page. Ref. Code: FusionCharts.printManager.enabled(true); Could you please try by using this line of code and try printing the whole page from browser's File → Print menu or from JavaScript's native window.print() function? Awaiting your response ! Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted July 11, 2012 Hi, Please note that using FusionCharts advanced PrintManager, you can print the entire webpage along with all chart contents, as it appears in the web page. For more information on "FusionCharts Print Manager", please follow the link below: http://docs.fusioncharts.com/charts/contents/?JavaScript/JS_PrintManager.html Batch Export Feature will let you export all the 7 charts image/PDF within a single page and download to user's machine and can not print all the charts along with the entire HTML page contents. Could you please specify your exact requirement, so that we can provide you the appropriate solution? Awaiting your valuable response ! Share this post Link to post Share on other sites
ganiganesh Report post Posted July 11, 2012 Hi, My requirement is that i want the same view like mycharts.jpeg but not like webpage.jpeg which i attached in print. i noticed that by using batch export if i save as image all 7 charts would be appearing as one by one in a single row which is not fine for me. i want the same view like mycharts.jpeg if i save as image please suggest me. Hi, Please note that using FusionCharts advanced PrintManager, you can print the entire webpage along with all chart contents, as it appears in the web page. For more information on "FusionCharts Print Manager", please follow the link below: http://docs.fusionch...intManager.html Batch Export Feature will let you export all the 7 charts image/PDF within a single page and download to user's machine and can not print all the charts along with the entire HTML page contents. Could you please specify your exact requirement, so that we can provide you the appropriate solution? Awaiting your valuable response ! MyCharts.bmp Share this post Link to post Share on other sites
Guest Bindhu Report post Posted July 12, 2012 Hi, Batch export aligns the charts one below the other. It is the intended behavior. Using Batch export, I am afraid, you will not be able to align the charts as is on the web page. Hope this helps! Share this post Link to post Share on other sites
ganiganesh Report post Posted July 12, 2012 hope print manager too wont work as per my requirement because its coded like window.print() Hi, Batch export aligns the charts one below the other. It is the intended behavior. Using Batch export, I am afraid, you will not be able to align the charts as is on the web page. Hope this helps! Share this post Link to post Share on other sites
Guest Bindhu Report post Posted July 13, 2012 (edited) Hi, Please note: If you wish to export the chart as is on the web page with all the alignments in tact, please use window.print() method. In this case if you do not wish to include the page content, then you have to write a few lines of code to hide the other div containers on the page. Ref. Code: <script type="text/javascript"> function printpage(){ // hide all the other div containers on the page. var ele = document.getElementById("header"); ele.style.display = "none"; // call window.print() once the other div containers are hidden window.print(); } </script> <input type="button" value="Print this page" onclick="printpage()" /> Hope this helps! Edited July 13, 2012 by Bindhu Share this post Link to post Share on other sites