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.

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

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?