Sign PDF hash using java and iText
问题 I have an application that generates a PDF, and that needs to be signed. We have not the certificates to sign the document, because they're in a HSM, and the only way we could make use of the certificates is using a webservice. PdfReader reader = new PdfReader(src); reader.setAppendable(true); ByteArrayOutputStream baos = new ByteArrayOutputStream(); FileOutputStream fout = new FileOutputStream(dest); PdfStamper stamper = PdfStamper.createSignature(reader, fout, '\0'); PdfSignatureAppearance