remove encryption from pdf with pdfbox, like qpdf
问题 With qpdf, you can simply remove restrictions/encryption from a pdf like so: qpdf --decrypt infile outfile I would like to do the same thing with PDFBox in Java: PDDocument doc = PDDocument.load(inputFilename); if( doc.isEncrypted() ) { //remove the encryption to alter the document } I've tried this with StandardDecryptionMaterial, but I have no idea what the owner password is. How does qpdf do this? Sample document: https://issues.apache.org/jira/secure/attachment/12514714/in.pdf 回答1: This