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

Signature annotation not showing #691

Closed
CervarlCG opened this issue Nov 26, 2020 · 9 comments
Closed

Signature annotation not showing #691

CervarlCG opened this issue Nov 26, 2020 · 9 comments
Assignees
Labels
question Further information is requested

Comments

@CervarlCG
Copy link

Hi, i like know if there is support to digital signature?
Actually i try to render a PDF but the signature is not rendering.

@GoranStoyanov
Copy link

I am facing the same problem. The solution I found is commenting out this piece of code in of pdf.worker.js, part of pdfjs-dist package:

if (data.fieldType === "Sig") {
      data.fieldValue = null;
      this.setFlags(_util.AnnotationFlag.HIDDEN);
}

It works but I am not sure if that's the best way to show the signatures :)

@wojtekmaj
Copy link
Owner

It looks like Mozilla PDF.js team has decided not to implement this annotation feature just yet. A comment around this block explains more:

https://github.com/mozilla/pdf.js/blob/4ba28de2608866dcb10d627d77dc19ff3d017c17/src/core/annotation.js#L995-L1002

Given that, we won't be able to do anything about it until Mozilla implements Sig annotation support. Sorry about that.

@wojtekmaj wojtekmaj self-assigned this Dec 3, 2020
@wojtekmaj wojtekmaj added the question Further information is requested label Dec 3, 2020
@wojtekmaj wojtekmaj changed the title Digital Signature Not Showing Signature annotation not showing Dec 3, 2020
@axl-axl
Copy link

axl-axl commented May 7, 2021

I am facing the same problem. The solution I found is commenting out this piece of code in of pdf.worker.js, part of pdfjs-dist package:

if (data.fieldType === "Sig") {
      data.fieldValue = null;
      this.setFlags(_util.AnnotationFlag.HIDDEN);
}

It works but I am not sure if that's the best way to show the signatures :)

hi, what`s version you use. I use react-pdf@4.2.0 and commenting out this piece of the code, but it not work

@fabrii
Copy link

fabrii commented Jun 15, 2021

@wojtekmaj

The new version of pdf.js now supports signature display: https://github.com/mozilla/pdf.js/releases/tag/v2.9.359
Does react-pdf have plans of upgrading in the near future? Thanks

@wojtekmaj
Copy link
Owner

That's not a new version. That's an unstable pre-release. Once they actually release a new version I'm usually not far behind.

@codehunter1992
Copy link

codehunter1992 commented Jun 27, 2021

@wojtekmaj

The new version of pdf.js now supports signature display: https://github.com/mozilla/pdf.js/releases/tag/v2.9.359
Does react-pdf have plans of upgrading in the near future? Thanks

Supporting digital signature visualization will be very great!!!

@wojtekmaj
Copy link
Owner

Support for Sig type has been added in v5.4.0-beta.2.

@codehunter1992
Copy link

Thank you very much. It works properly for me.

@duylinhdang1998
Copy link

How to display it @wojtekmaj ? thanks

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

No branches or pull requests

7 participants