Sign PDF with plain JavaScript

前端 未结 4 1312
悲&欢浪女
悲&欢浪女 2020-11-22 04:41

With WebCrypto API evolving and being supported by Chrome and Firefox, I would like to use it for digitally signing a PDF document. There is not much of literature around, b

4条回答
  •  天命终不由人
    2020-11-22 05:36

    You can sign any file (including pdf) using openpgp.js

    https://openpgpjs.org/openpgpjs/doc/#create-and-verify-detached-signatures

    (scroll down to 'create-and-verify-detached-signatures')

    Read the file as a Uint8Array and sign it with your private key.

提交回复
热议问题