Textarea and input text is editable when using HTML2PDF plugin

假如想象 提交于 2019-12-13 04:38:49

问题


I am using HTL2PDF plugin .

My problem is the Texarea and PDF is all editable in PDF that I recieve

My code is as follow

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');

is there a way I can stop it from converting into editable PDF


回答1:


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'), '');

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:

  • 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


来源:https://stackoverflow.com/questions/32096900/textarea-and-input-text-is-editable-when-using-html2pdf-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!