Sign PDF with plain JavaScript

前端 未结 4 1143
悲&欢浪女
悲&欢浪女 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:30

    It is technically possible to do this, in-fact it is one of the scenarios we had in mind when we made PKIjs (which is why there is this sample) - https://pkijs.org/examples/PDFexample.html

    That said to do signing requires working with the PDF structure itself, which either requires a custom parser or modifications to an existing one (pdfjs for example).

    Long story short, signing a PDF in browser will take a lot of work, it is something we are working on though.

提交回复
热议问题