This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Fusion Charts - intermittent pdf problem

callen wrote on 2011-04-26:
Hi,

I'm testing pdfcrowd for my website and have found that when using Fusion charts pdfcrowd sometimes works (ie creates the charts) and sometimes fails (blank chart).

I am creating Javascript-based charts using Fusion charts (the FC_SetRenderer("javascript"); option in fusion charts). I understand that fusion charts uses highchart to do the work for Javascript-based charts.

I suspect this problem is because it takes a few seconds for Fusion charts to render the chart in the browser and I suspect your pdfcrowd software sometimes takes a grab after this rendering (so the chart displays correctly) and sometimes before this rendering (so no chart visible). Note that I am _not_ getting a timeout with pdfcrowd.

I can email through example html and the example output pdfs if helpful.

Thanks,

Charles.
support wrote on 2011-04-26:
Hi Charles,

Your guess is likely correct. Please send your html code to info@pdfcrowd.com and we will look into it.
callen wrote on 2011-04-26:
Code and example pdfs sent to you by email
robbrit wrote on 2013-02-28:
Hello, was this problem ever resolved? I'm also getting this issue.
support wrote on 2013-03-01:
Yes, the solution is to load jquery and highcharts just before the closing </head> tag:

<script type="text/javascript" 
           src="http://yourdomain.com/path/to/Charts/jquery.min.js"></script>
<script type="text/javascript"
           src="http://yourdomain.com/path/to//Charts/highcharts.js"></script>


Does this help in your case?

Normally, these files are loaded by Fusion Charts after the onload event is fired. Our PDF tool uses some heuristics to detect long running onload scripts and if the files take too long to download then the script is aborted and the charts are not created. The code above causes that the files are loaded before the onload event which should ensure that the charts are created.