Please find the below snippet which is used to change the document restriction properties like document assembly,content copying etc.,
Document doc = new Document(“sample.pdf”);
PdfFileInfo info = new PdfFileInfo(doc);
DocumentPrivilege p = info.getDocumentPrivilege();
p.setAllowAssembly(true);
p.setAllowCopy(false);
PdfFileSecurity fileSecurity = new PdfFileSecurity();
fileSecurity.bindPdf(doc);
fileSecurity.setPrivilege§;
fileSecurity.save(“sampleUpdated”);
1.Document assembly is set to “false” in base document by default.
2.Trying to change it to “true” for allowing document assembly as true,which is not working.
Observation:The same approach is working for content copying to make it as true and vice versa