|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /home/queenjbs/www/FusionChart/Contents/exporting-image/server-side/ |
Upload File : |
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Exporting Charts as PDF or Images - Server-side export - Overview</title>
<link rel="stylesheet" href="../../assets/ui/css/style.css" type="text/css" />
<script type="text/javascript" src="../../assets/prettify/prettify.js"></script>
<link rel="stylesheet" type="text/css" href="../../assets/prettify/prettify.css" />
<script type="text/javascript" src="../../assets/ui/js/jquery.min.js" ></script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute;
left:0px;
top:0px;
z-index:4;
visibility:hidden; }
a.whtbtnhide, a.whtbtnshow, a.whtbtnhidenav , a.whtbtnshownav { border-bottom:none !important; }
-->
</style>
<script type="text/javascript" language="javascript1.2" src="../../assets/ui/js/whmsg.js"></script>
<script type="text/javascript" language="javascript" src="../../assets/ui/js/whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="../../assets/ui/js/whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="../../assets/ui/js/whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="../../assets/ui/js/whlang.js"></script>
<script type="text/javascript" language="javascript1.2" src="../../assets/ui/js/whtopic.js"></script>
<script type="text/javascript" src="../../assets/ui/js/lib.js"></script>
</head>
<body>
<!-- breadcrumb starts here -->
<div id="breadcrumb"></div>
<script type="text/javascript">
document.write( addFCBreadcrumb( [ "Home|../../Introduction/Overview.html", "Exporting as Image/PDF|../ECOverview.html", "Server-side export", "Overview" ] ) );
</script>
<!-- breadcrumb ends here -->
<table width="98%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td class="pageHeader">Server-side export</td>
</tr>
<tr>
<td valign="top" class="text"><p>The export process, when using Server-side Export Handlers, can be visualized as under:</p> </td>
</tr>
<tr>
<td valign="top" class="text"><img src="../Images/ECServerOverview1.gif" width="649" height="439" /></td>
</tr>
<tr>
<td valign="top" class="text"><p>As shown above, when exporting the charts as images/PDFs using Server-side Export Handlers, there are two actions that you can choose from:</p>
<ol>
<li><strong>Download to end user</strong> - Return the generated image/PDF back to the client (browser) for downloading</li>
<li><strong>Save on server disk</strong> - Save the image on server-disk and return the URL of the same to callback JavaScript functions </li>
</ol>
<p class="highlightBlock">Please note that in both cases, the chart first needs to render in a browser, before the bitmap snapshot can be sent to server for processing. You cannot directly generate an image of chart on server, without actually rendering it in browser. </p> </td>
</tr>
<tr>
<td valign="top" class="header">Elements involved </td>
</tr>
<tr>
<td valign="top" class="text"><p>For enabling export of chart at Server-side, we will need to assemble the following elements: </p>
<ul>
<li><strong>The chart itself</strong> embedded using FusionCharts JavaScript class (<span class="codeInline">FusionCharts.js</span>). Here, we assume that you have been able to generate the chart for your page. If not, please refer to the relevant section of our documentation. </li>
<li><strong>FusionCharts Export Handlers (Server-side)</strong> - In case of Server-side export, these Server-side scripts accept and convert the bitmap snapshot of charts into images/PDFs. We have provided ready-to-use Server-side Export Handlers in multiple programming languages like ASP.NET, PHP, J2EE and Ruby on Rails. Depending on what technology you are using, you can copy-paste the relevant files from <span class="codeInline">Download Package > ExportHandlers</span> folder to your web server. </li>
</ul>
<p>So let us quickly get started and setup a simple example that exports the chart as an image and sends it back to browser (for the user to save). </p></td>
</tr>
</table>
<!-- footer links starts-->
<div id="fcfooter"></div>
<script type="text/javascript">
document.getElementById("fcfooter").innerHTML = addFCFooter("XML Attributes|../ECXML.html","Returning image as download|ECServerDownload.html");
</script>
<!-- footer links ends -->
<script type="text/javascript" language="javascript1.2">//<![CDATA[
<!--
highlightSearch();
//-->
//]]></script>
</body>
</html>