How to set Page extraction Property for PDF File in aspose Java(Which is the API to set)

Which is the API used to set the page Extraction as “Allowed” in java.

@NayanaN

In order to allow page extraction, you can use the method setAllowModifyContents of DocumentPrivilege Class.

Hi Team
Tried with the above method to set Page extraction to allowed.Please find the below snippet for the same.
Document doc = new Document(“C:\Users\00003696\Downloads\sample.pdf”);
PdfFileInfo info = new PdfFileInfo(doc);
DocumentPrivilege p = info.getDocumentPrivilege();
p.setAllowAssembly(true);
p.setAllowModifyContents(true);
p.setAllowCopy(false);
PdfFileSecurity fileSecurity = new PdfFileSecurity();
fileSecurity.bindPdf(doc);
fileSecurity.setPrivilege§;
fileSecurity.save(“C:\Users\00003696\Downloads\sampleUpdated.pdf”);

sample.pdf (34.7 KB)
Please find the sample document

@NayanaN

We were able to notice that API was unable to set Page Extraction Privilege according to specified flag. Therefore, we have logged an issue as PDFJAVA-39501 in our issue tracking system for the sake of correction. We will look into its details and keep you informed about its resolution status. Please be patient and spare us some time.

We are sorry for the inconvenience.