【发布时间】:2022-12-30 02:38:06
【问题描述】:
我正在使用 jsPDF 创建一个 pdf。我已经成功创建了pdf文件。但我想加密我的 pdf 文件并允许“打印、修改、复制”等可访问性。向以下代码添加加密属性后,它不会加密我的文件。
这是代码。那么我应该怎么做才能加密pdf文件呢?
<code>
doc = new jsPDF({
unit: 'pt', // set the unit of measurement to px
format: 'a1', // set your paper size format
userUnit:72, // set the DPI you desire. We used 72 because thats
the default DPI used in browsers.
encryption: {
userPassword:"1234sds@esdsdsds#22s5",
ownerPassword:"797233232#2ewwe24",
userPermissions:["print","copy"]
}
}); //
【问题讨论】:
标签: encryption pdf-generation jspdf pdfkit jspdf-autotable