juliabeijing
New Member
I'm making a data visualisation tool that works using SVG, d3.js and JQuery. I am currently making a feature to export (and download) as an SVG file:\[code\]// Code on main pagevar svg = $("#svg-wrap").html();var win = window.open("export.php?svg=" + svg, '_blank'); // _blank means export.php opens in a new tabwin.focus;// Code in export.php<?phpob_start();header("Content-Type: application/octet-stream");header("Content-disposition: attachment; filename=data.svg");$svg = $_GET["svg"];echo stripslashes($svg);?>\[/code\]This doesn't work though, because although some of the SVG is passed through, the full code is too long for a query string (or so it seems).Is there some way that I can fix this? I could use compression, but that would only shrink it up to a limit and I think it would probably still be too long - the SVG code could be hundreds of lines .