jPDFSecure is a Java library which can digitally sign PDF documents and change security settings on PDF Documents. With it, your application or applet can encrypt PDF documents, set permissions and passwords, and create and apply digital signatures. It has a simple interface to load PDF documents from files, network drives, URLs and input streams, which can be generated at runtime or come directly from a database. After changing security settings, it can save the document to a file, a java.io.OutputStream, or a javax.servlet.ServletOutputStream when running in a J2EE application server to output the file directly to a browser.

URL: jPDFSecure | Java PDF Security and Sign Library | Digitally Sign PDFs, Set passwords & permissions with Java