1
jspdf를 작동 시키려고합니다. 내 피들에서 버튼을 클릭 한 후에 아무 것도 일어나지 않습니다. 다음은 jsfiddle (https://jsfiddle.net/light22/68h81owf/)입니다. 도와 주셔서 미리 감사드립니다.jspdf에서 html을 PDF로 렌더링하는 데 도움이 필요합니다.
<script>
function demoFromHTML() {
var pdf = new jsPDF('p', 'pt', 'letter');
source = $('#for_pdf')[0];
specialElementHandlers = {
'#bypassme': function (element, renderer) {
return true
}
};
margins = {
top: 80,
bottom: 60,
left: 40,
width: 522
};
pdf.fromHTML(
source,
margins.left,
margins.top, {
'width': margins.width,
'elementHandlers': specialElementHandlers
},
function (dispose) {
pdf.save('download.pdf');
}, margins
);
}
</script>
고정 코드 블록 형식 및 명확한 질문 – Dave