On Thursday, February 9, 2012 11:45:18 AM UTC-5, allanh wrote:
I was wondering if you could do something.
allow restrictions to pdf.
as: printing, etc. modify document?
It is possible?
If you're using the CPDF back end you would do something like the following:
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->get_canvas()->get_cpdf()->setEncryption('userpass', 'ownerpass', array('print'));
$dompdf->stream('protected.pdf');
userpass/ownerpass are the passwords for opening the document. If you leave the owner password blank it will be set to the same as user password. The options available for the user permission array are: print, modify, copy, add.