Ho problemi nel rendering dell'elemento svg in pdf usando jspdf. Iam utilizzando il plugin https://github.com/CBiX/svgToPdf.js/ per farlo.Render da Svg a Pdf usando jspdf
Qui di seguito è il mio codice
// I recommend to keep the svg visible as a preview
var tmp = document.getElementById("chartContainer");
var svgDoc = tmp.getElementsByTagName("svg")[0];
var pdf = new jsPDF('p', 'pt', 'a4');
svgElementToPdf(svgDoc, pdf, {
scale: 72/96, // this is the ratio of px to pt units
removeInvalid: false // this removes elements that could not be translated to pdf from the source svg
});
pdf.output('datauri'); // use output() to get the jsPDF buffer
Si generarting PDF vuoto. Please help
svgToPdf supportare solo g, linea, rect, ellisse , cerchio, elementi di testo e alcuni attributi. Gioca come una semplice demo. – cuixiping
@Priyesh Tiwari: sto ottenendo lo stesso problema svg alla conversione pdf, come hai risolto il tuo problema? –