Witam
Dodałem kod js do generowania pdf z div lecz gdy pobieram plik i otwieram go to robi sie straszny bałagan
Wiecie jak temu zaradzić?
$(document).ready(function() {
$('#download').click(function () {
var pdf = new jsPDF('p', 'pt', 'letter')
, source = $('#page')[0]
, specialElementHandlers = {
'#bypassme': function(element, renderer){
return true
}
}
margins = {
top: 60,
bottom: 60,
left: 40,
width: 522
};
pdf.fromHTML(
source
, margins.left
, margins.top
, {
'width': margins.width
, 'elementHandlers': specialElementHandlers
},
function (dispose) {
pdf.save('Downloaded.pdf');
},
margins
)
});
});