Re: Printing only SVG in Web Page
<[email protected]> 13 Dec 2013 10:06:58 -0800
| Newsgroups | gmane.text.xml.svg.devel |
|---|---|
| Message-ID | <[email protected]> |
Yes,.. actually, the code was ignoring the dataURL request and copying the div contents directly to the print HTML as svg. Therefore the printCasvas is not required for the svg print. and the code changed to
the much simpler(he clone is not required)
var printSVG = function() {
var popUpAndPrint = function()
{
var container = $('#svgDiv');
var width = 1200
var height = 600
var printWindow = window.open('', 'PrintMap',
'width=' + width + ',height=' + height);
printWindow.document.writeln($(container).html());
printWindow.document.close();
printWindow.focus();
};
setTimeout(popUpAndPrint, 500);
};