For an intranet application i need a way to send a sencha chart per mail. Because this app has no connection to the internet it must be a php way.
Any ideas except phantomjs?
Bye, Dumbledore
Printable View
For an intranet application i need a way to send a sencha chart per mail. Because this app has no connection to the internet it must be a php way.
Any ideas except phantomjs?
Bye, Dumbledore
I've done something similar in my intranet app. When saving the chart, I use type "image/svg+xml". Then, I post the svg content to my server, where some utilities convert the svg/xml to a .png file which can be downloaded, emailed, whatever.
Here's the code from my controller:
Code:saveChart: function( btn, e, opts ) {
var me = this,
window = btn.up( 'window' ),
chart = window.down( 'chart' ),
formEl = Ext.get(document.createElement('form')),
svgEl = Ext.get(document.createElement('input')),
svgContent;
svgContent = chart.save({
type: 'image/svg+xml'
});
formEl.set({
action: 'reports/savechart',
method: 'POST',
target: '_blank'
});
svgEl.set({
name: 'svg',
type: 'hidden',
value: svgContent
});
formEl.appendChild(svgEl);
Ext.getBody().appendChild(formEl);
formEl.dom.submit();
}
cool... can you recommend server side tools for convert svg to png?
Thanks!
Dumbledore
This is one I've had luck with: http://xmlgraphics.apache.org/batik/
Good luck!