Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No fieldValue on fieldType "Sig" #15301

Closed
disjaPf opened this issue Aug 11, 2022 · 1 comment
Closed

No fieldValue on fieldType "Sig" #15301

disjaPf opened this issue Aug 11, 2022 · 1 comment

Comments

@disjaPf
Copy link

disjaPf commented Aug 11, 2022

I have made an update from version 2.4.456 to version 2.15.349. Everything seemed to work! After some further tests I had to find out that something has changed.

In version 2.4.456 it was possible (with some effort) to distinguish between signed and unsigned signature fields. So after calling the method getAnnotations() the fieldValue was filled with "Sig" for fieldType="Sig". So that was for me the distinction that a signature field was already signed. In case of unsigned signature fields the fieldValue remained null.

In version 2.15.349 the fieldValue in the resolved promise is always null. Also in case of already signed fields. See following:

image

A verfication of a digital signature is not important for me. I only want the fieldValue to be filled when an annotation of a type "Sig" is filled.

Is it possible to implement this????
Or is there already a way distinguish between signed and unsigned signature types????

@Snuffleupagus
Copy link
Collaborator

A verfication of a digital signature is not important for me. I only want the fieldValue to be filled when an annotation of a type "Sig" is filled.

The first part would be required in order to support the second part properly, since otherwise there'll be breaking errors in the general case:

pdf.js/src/core/annotation.js

Lines 3163 to 3166 in ab1297f

// Unset the fieldValue since it's (most likely) a `Dict` which is
// non-serializable and will thus cause errors when sending annotations
// to the main-thread (issue 10347).
this.data.fieldValue = null;

Is it possible to implement this????

Unfortunately not, without implementing #13351 first (of which this is thus basically a duplicate).

Or is there already a way distinguish between signed and unsigned signature types????

No, since we currently don't parse SignatureAnnotations at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants