All,
I'm trying to create a test doc for permission checking over on Tika, when I
try the most basic program:
public static void main(String[] args) throws Exception {
File f = new File("C:/temp/testPDF_protected.pdf");
PDDocument document = new PDDocument();
AccessPermission ap = new AccessPermission();
ap.setReadOnly();
StandardProtectionPolicy spp = new StandardProtectionPolicy("owner",
"user", ap);
document.protect(spp);
document.save(f);
document.close();
}
AdobeReader isn't able to open the file. I'm sure that this is user
error...what am I doing wrong?
Thank you.
Best,
Tim