使用HTML2PDF插件时,Textarea和输入文本是可编辑的 [英] Textarea and input text is editable when using HTML2PDF plugin
问题描述
我正在使用HTL2PDF插件.
I am using HTL2PDF plugin .
我的问题是Texarea,我收到的PDF都可以编辑PDF
My problem is the Texarea and PDF is all editable in PDF that I recieve
我的代码如下
require_once(app_path().'/libs/html2pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P','A4','en');
$html2pdf->pdf->SetDisplayMode('fullpage');
$html2pdf->WriteHTML($html22);
$htmltosend=$html2pdf->Output('','S');
有什么办法可以阻止它转换为可编辑的PDF
is there a way I can stop it from converting into editable PDF
推荐答案
如果我对您的理解正确,那么您想创建PDF,但该PDF应该不可编辑吗?像这样使用SetProtection
:
If I understand you correctly, you want to create the PDF, but it should not be editable? Use SetProtection
like:
$html2pdf->pdf->SetProtection(array('print'), '');
您可以在 http://wiki上找到更多信息. spipu.net/doku.php?id=html2pdf:en:v4:protect . 如果使用空的权限数组,则仅允许查看,甚至不允许打印.权限的可能值为:
You can find further information at http://wiki.spipu.net/doku.php?id=html2pdf:en:v4:protect. If you use an empty permissions array, only viewing but not even printing will be allowed. Possible values for the permissions are:
- 复制:将文本和图像复制到剪贴板
- 打印:打印文档
- 修改:对其进行修改(注释和表格除外)
- annot-forms:添加注释和表单
- copy: copy text and images to the clipboard
- print: print the document
- modify: modify it (except for annotations and forms)
- annot-forms: add annotations and forms
这篇关于使用HTML2PDF插件时,Textarea和输入文本是可编辑的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!