itextSharp - Merging pdf files disables extended reader permissions

谁都会走 提交于 2019-12-02 03:07:22

Reader permissions can be enabled only by Adobe products. They are based on a custom digital signature that is invalidated when the file is modified. The certificate for this digital signature is owned by Adobe and it is not public, also the computation of this digital signature is not documented. You cannot re-enable in any way the reader permissions after you merged the files, unless you use Acrobat on the merged file.

In order to preserve existing reader enabled permissions, you have to use a PdfStamper in APPEND mode.

There are also a number of things you Shouldn't Do to such a PDF or you'll disable the extra permissions anyway... I believe "add pages" and "add annotations/fields" are on the list of things you can't do.

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