Javascript 使用jspdf和html2canvas库下载pdf会使pdf内容变得模糊

Javascript 使用jspdf和html2canvas库下载pdf会使pdf内容变得模糊,javascript,jquery,jspdf,html2canvas,Javascript,Jquery,Jspdf,Html2canvas,当我使用jspdf和html2canvas库下载pdf时,pdf内容变得模糊。这里我想把一个html文件转换成pdf。图片质量和文本质量正在下降 <div id="content" style="background-color: #ffffff;"> <div class="container-fluid" style="color:black;"> <table style="margin-bottom: 0px;border-collapse:co

当我使用jspdf和html2canvas库下载pdf时,pdf内容变得模糊。这里我想把一个html文件转换成pdf。图片质量和文本质量正在下降

<div id="content" style="background-color: #ffffff;">

   <div class="container-fluid" style="color:black;">


<table style="margin-bottom: 0px;border-collapse:collapse;border: 1px solid black;" id="table-sm" class="table table-bordered  table-sm">

                    <tbody>
                    <tr >

                        <td class="color-blue-grey-lighter" colspan="3" style="border: 1px solid black ;"><center><img src="fb.png"></center></td>

                    </tr>

                    <tr>

                    </tbody></table>

                <table style="margin-top: 0px;border-collapse:collapse;border: 1px solid black;" id="table-sm" class="table table-bordered  table-sm">
                    <tbody>

                        <tr >
                        <td style="border: 1px solid black ;" class="color-blue-grey-lighter" colspan="2"><strong>DECLARATION: </strong><p style="color:black;">I hereby delare that the infomation furnished by me in the Registration/Application Form is correct and nothing has been concleaded.In case any information furnished by me is found to be false/incorrect/untrue then i shall be liable to civil/criminal prosecution and my claim to asmission/appointment/registraion/service in the Institute may be cancelled/terminated.</p></td>

                        </tr>

                    </tbody>
                </table>
</div>

</div>
<button id="cmd" style="float: right;" type="button" class="btn btn-danger">Download</button>

<script>
$('#cmd').click(function() {
  var options = {};
  var pdf = new jsPDF('p', 'pt', 'a4');
  <!--pdf.setTextColor(255,0,0);-->
  pdf.addHTML($("#content"), 15, 15, options, function() {
    pdf.save('pageContent.pdf');
  });
});

</script>

声明:

本人特此声明,本人在注册/申请表中提供的信息是正确的,并且未提供任何信息。如果本人提供的任何信息被发现是虚假/不正确/不真实的,则本人将受到民事/刑事起诉,本人在学院的任命/任命/注册/服务请求可能会被驳回取消/终止

下载 $('#cmd')。单击(函数(){ var选项={}; var pdf=新的jsPDF('p','pt','a4'); pdf.addHTML($(“#内容”)、15、15、选项、函数(){ 保存('pageContent.pdf'); }); });