Table of Contents
Question content
Workaround
Home Java Multiple contract extensions

Multiple contract extensions

Feb 12, 2024 pm 05:15 PM

Question content

I hope to be able touse itext to sign pdf files multiple times. But I don't have the private key. I'm generating a hash for the client to sign, and after re-signing, I call signDeferred(). Is it possible to make multiple empty containers, generate a hash with all empty containers, and then add signatures as they appear?

I tried adding more than 1 empty container, generated the hash, client signed and returned the hash, I tried adding but got the error that it was not the last field. You can only call ​​signDeferred on the last field. But I don't know how to fix it since signDetached is not an option since I don't have the private key.

Workaround

No, this is not possible, at least not for interoperable PDF signatures.

The reason is that there is no real concept of parallel signatures (or counter-signatures) specified for PDF, only the concept of serial signatures, one signature after another, with each new signature also overwriting all previous signatures:

(See this answer for more details.)

Strictly speaking, the PDF specification does not require signatures to cover all entire revisions except for placeholders embedded in the signature container itself, it just recommends it. Therefore, it is theoretically possible to create a PDF with multiple signatures, each covering the entire PDF except for all embedded signature values.

But in practice, the PDF signature validator rejects such constructs. Additionally, more modern signing profiles (particularly the PAdES baseline profile) do require signatures to cover all entire revisions except for signed container placeholders.

The above is the detailed content of Multiple contract extensions. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)