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
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.