duanqinqiao4844 2017-11-23 10:30
浏览 26
已采纳

使用zend pdf限制用户操作

Is it possible at all in Zend Framework (any version) to restrict user actions with Zend Pdf?

For example with Adobe Acrobat you can put a password on the PDF file and customize it by setting permissions on it. Such as allowed to copy, edit and print with valid password. Otherwise the user can, for example, only view the pdf.

I generate pdf files for the clients based on their profiles with zend pdf from Zend Framework 2. Some clients want the pdf to have by default only view permission. Is this possible through Zend Framework?

If it isn't, would using chmod be a good option to change the file permissions?

As a sidenote, yes I am fully aware that there are plenty of work-arounds in order to gain full access to the pdf, but having the view only permission filters out 99% of the users that would want to modify it.

If this is simply impossible, no matter how you look at it, is there any suggestion then?

  • 写回答

1条回答 默认 最新

  • douqiao6563 2017-11-23 12:14
    关注

    To use all the pdf customizations you have to use external PDF libraries as Zend PDF doesn't provide all the customizations properly. I already have faced a lot of issues using Zend PDF and now I'm using MPDF which is very simple to use as compared to Zend PDF and also you can do all the stuffs that you want to do right now such as allowed to copy, edit and print with valid password etc. So go through this link you can find everything.

    https://mpdf.github.io/reference/mpdf-functions/setprotection.html.

    Thanks.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮