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 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加
  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题
  • ¥30 酬劳2w元求合作写文章
  • ¥15 在现有系统基础上增加功能