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.


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();
PdfFileSecurity fileSecurity = new PdfFileSecurity();

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


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.