Since PDF has explicit support for digital signatures, the process of signing them is different from what you may have to use for βanother document,β as you already indicated .
If you have a document format that does not support digital signature, "embedded", you can transfer it to another format that supports digital signatures, such as S / MIME. Support for BouncyCastle S / MIME is fine.
source share