FormJS.js 1.04 KB
Newer Older
Angel Zarate committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
function limpiarFormulario() {
    window.location.reload()
}
function pdfexport() {
     var text = document.getElementById("miFormulario").innerText;
    var doc = new jsPDF();
    doc.setFontSize(22);
    doc.text(text, 5, 5);
    doc.save(); 
//     var pdf = new jsPDF('p', 'pt', 'letter');
// pdf.html(document.getElementById("miFormulario")), {
// callback: function (pdf) {
// var iframe = document.createElement('iframe');
// iframe.setAttribute('style', 'position:absolute;right:0; top:0; bottom:0; height:100%; width:500px');
//  document.body.appendChild(iframe);
// iframe.src = pdf.output('datauristring');
// pdf.save("Cv.pdf");
}

function pdfexport(){
    var pdf = new jsPDF('p', 'pt', 'letter');
pdf.html(document.getElementById("miFormulario"), {
callback: function (pdf) {
// var iframe = document.createElement('iframe');
// iframe.setAttribute('style', 'position:absolute;right:0; top:0; bottom:0; height:100%; width:500px');
// document.body.appendChild(iframe);
// iframe.src = pdf.output('datauristring');
pdf.save("Cv.pdf");
}
});
}