Home
Analytics
Birt + Highcharts Not Exporting
anonymoose
<p>Hello and happy holidays!</p>
<p> </p>
<p>I'm importing jquery and highcharts into my report. I'm able to render a highchart into the web view but exporting to pdf yields a blank container. </p>
<p> </p>
<p>Is there a way to make highcharts exportable?</p>
Find more posts tagged with
Comments
micajblock
<p>Highcharts requires a browser to render the charts. As such PDF reader can't render the chart. Actuate's commercial offering offers a solution. Yo my knowledge your only other choice is to create a custom emitter that will somehow use a pseudo browser to render the chart and then convert to an image. </p>
anonymoose
<p>Thanks Mica.</p>
<p> </p>
<p>Is there an example of how to write my own emitter documented somewhere? Is emitter global and singular or is there one per component?</p>
<p> </p>
<p>I was trying to reason what makes the highchart graph different thant the default graphs:</p>
<p>I know that default charts are rendered as SVGs in the browser (linked from a temp file). Highcharts graphs are also rendered in browser as SVGs.</p>
<p> </p>
<p>I originally assumed that the default SVGs are later converted to image by some raster process. Your reply implies they are not?</p>
<p> </p>
<p>I did some follow up experiments where I attempted to substitue the SVG content in the temp files for different SVG content but still couldn't get it to render when exporting to PDF (original chart was still rendered). This further implies that the chart is actually re-created from scratch when exporting to PDF rather than simply converted from the SVG that's already there.</p>
<p> </p>
<p>Is my understanding correct?</p>
<p>Would it be feasible to write an emitter that calls out to a headless js engine passing in the js highcharts config in order to create image?</p>
micajblock
<p>This is not really my area of expertise but I will try and answer. Basically all export options in BIRT (PDF, Excel...) are emitters. So an emitter is global for all reports. </p>
<p>In BIRT a report document is created and then this is rendered via an emitter to the different formats (HTML, PDF, Excel...). So the generation of the chart image is dependent on the emitter used.</p>
<p>A quick Google search found a bunch of tutorials and blogs on the topic.</p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/331-tutorial-writing-birt-emitters-xml-and-jpeg-emitter/'>http://developer.actuate.com/community/forum/index.php?/files/file/331-tutorial-writing-birt-emitters-xml-and-jpeg-emitter/</a>which
points <a>to
http://www.ibm.com/developerworks/library/ba-birt-emitter/</a>
; </p>
<p><a data-ipb='nomediaparse' href='
http://blog.zenika.com/2009/05/19/eclipse-birt-create-your-own-swt-emitter/'>http://blog.zenika.com/2009/05/19/eclipse-birt-create-your-own-swt-emitter/</a></p>
;