如何使用java在数字签名的pdf中添加空白页? [英] how to add blank page in digitally signed pdf using java?

查看:231
本文介绍了如何使用java在数字签名的pdf中添加空白页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 itext库在数字PDF的末尾插入空白页面。我的困惑是添加页面会使现有签名无效?
谢谢。

I want to insert blank page at end of the digitally PDF using itext library.and my confusion is adding pages will invalidate the existing signatures? Thank you.

推荐答案

要将Joeri的答案放到上下文中,请查看Adobe技术白皮书 Adob​​e Acrobat 9数字签名,更改和改进,尤其是允许和禁止更改部分。这里Adobe 阐明了允许的更改(如Acrobat 9及更高版本所示),可以对经过认证或签名的文档进行,而不会使应用于文档的签名无效。

To put Joeri's answer into context, have a look at the Adobe technical white paper Adobe Acrobat 9 Digital Signatures, Changes and Improvements, especially its section "Allowed and disallowed changes." Here Adobe clarifies the allowed changes (as seen by Acrobat 9 and up) that can be made to a certified or signed document without invalidating the signatures applied to the document.


认证文件的允许操作

通过认证,不允许更改


  • 允许


    • 不允许更改


    • 数字签名

    • 提供表单字段值

    • 添加或编辑注释

    • 添加表单字段

    • 更改页面内容

    • Digitally signing
    • Supplying form field values
    • Adding or editing annotations
    • Adding form fields
    • Changing page content

    通过表格填写和数字签名认证


    • 允许


      • 提供表单字段值

      • 数字签名

      • 添加或编辑注释

      • 添加表单字段

      • 更改页面内容

      通过注释,表格填写和数字签名认证,允许


      • 允许


        • 添加或编辑注释

        • 提供表单字段值

        • 数字签名

        • Allowed
          • Adding or editing annotations
          • Supplying form field values
          • Digitally signing

          • 添加表单字段

          • 更改页面内容

          已签名但未经证明的文件允许采取行动


          • 允许


            • 添加签名字段(请参阅向签名b添加签名字段的限制未经证明的文件

            • 添加或编辑注释

            • 提供表单字段值

            • 数字签署

            • Allowed
              • Adding signature fields (see Limitations on adding signature fields to signed but uncertified documents)
              • Adding or editing annotations
              • Supplying form field values
              • Digitally signing

              • 添加签名字段以外的表单字段

              • 更改页面内容

              如您所见,更改页面内容始终位于不允许类别中。由于添加页面会更改页面内容 - 之后至少有一个白页,而以前没有任何内容 - 这是不允许的。

              As you see "Changing page content" always is in the "Disallowed" category. As adding a page changes page content — afterwards there is at least a white page where there used to be nothing —, this is not allowed.

              (尽管没有明确提及在这里,只要允许表单填写符合PDF标准,很可能也允许实例化页面模板,参见 ISO 32000-1 第12.8.2.2.2节。但是使用此类页面模板至少需要特别准备文档在签名之前,你的问题听起来就像文件已经签署而没有任何这样的准备......)

              (Even though not explicitly mentioned here, instantiating page templates most likely also is allowed whenever form fill-ins are allowed as that would conform to the PDF standard, cf. ISO 32000-1 section 12.8.2.2.2. But making use of such page templates would at least require the document to be specially prepared before signing, and your question sounds like the documents are already signed without any such preparation...)

              PS:显然即使是这些允许更改需要在追加模式即增量更新中添加。任何其他东西都会破坏签名。对于某些背景,请参阅此答案

              PS: Obviously even these allowed changes need to be added in append mode aka incremental updates. Anything else will break the signature for good. For some backgrounds see this answer.

              这篇关于如何使用java在数字签名的pdf中添加空白页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆