Hi Tim,
add a page to the document.
PDPage page = new PDPage();
document.addPage(page);
Tilman
Am 20.02.2015 um 22:12 schrieb Allison, Timothy B.:
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]