Javascript PDF:使动态内容清晰易读

Javascript PDF:使动态内容清晰易读,javascript,jspdf,html2canvas,Javascript,Jspdf,Html2canvas,我的HTML文档有一些动态值,我想将ID为offer的元素打印为PDF 我正在使用jsPDF和html2canvas $.loadScript('https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.2.61/jspdf.min.js,函数(){ $.loadScript('https://html2canvas.hertzen.com/dist/html2canvas.min.js,函数(){ //创建PDF window.location.href='

我的HTML文档有一些动态值,我想将ID为
offer
的元素打印为PDF

我正在使用jsPDF和html2canvas

$.loadScript('https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.2.61/jspdf.min.js,函数(){
$.loadScript('https://html2canvas.hertzen.com/dist/html2canvas.min.js,函数(){
//创建PDF
window.location.href='#';
var quotes=document.getElementById('offer');
html2canvas(引用)
.然后((画布)=>{
//!制作你的PDF
var pdf=新的jsPDF(“p”、“pt”、“字母”);
对于(var i=0;i