I don't know if it is possible to create a PDF with password security enabled that also allows extraction of pages. I haven't found any property in iTextSharp which will allow enable page extraction. The following screen shot shows the property that I would like to enable.
I've taken a look at the permission bits in the draft of ISO-32000-2 and I've compared them with the parameters (written in ALL_CAPS) available in iText:
- bit 1: Not assigned
- bit 2: Not assigned
- bit 3: Degraded printing: ALLOW_DEGRADED_PRINTING
- bit 4: Modify contents: ALLOW_MODIFY_CONTENTS
- bit 5: Extract text / graphics: ALLOW_COPY
- bit 6: Add / Modify text annotations: ALLOW_MODIFY_ANNOTATIONS
- bit 7: Not assigned
- bit 8: Not assigned
- bit 9: Fill in fields: ALLOW_FILL_IN
- bit 10: Deprecated ALLOW_SCREEN_READERS
- bit 11: Assembly: ALLOW_ASSEMBLY
- bit 12: Printing: ALLOW_PRINTING
When I compare the spec with your screen shot, I assume that the permissions are as follows:
- Printing: ALLOW_DEGRADED_PRINTING or ALLOW_PRINTING
- Changing the document: ALLOW_MODIFY_CONTENTS
- Commenting: ALLOW_MODIFY_ANNOTATIONS
- Form Field Fill-in or Signing: ALLOW_FILL_IN
- Document Assembly: ALLOW_ASSEMBLY
- Content copying: ALLOW_COPY
- Content Accessibility Enabled: ALLOW_SCREENREADERS
I can't find any permission bit that refers to page extraction. I have tried setting all the flags that are documented in ISO-32000-2, but they didn't result in setting the Page Extraction to Allowed.
I have tried two things:
First I tried setting the bits that aren't assigned: bit 1, 2, 7, 8, 13, 14. This didn't change anything. Then I opened a test document in Acrobat and I tried finding a setting that would allow page extraction:
I couldn't find any.
As the permission isn't described in ISO-32000 and as there doesn't seem to be a way to set this permission in Acrobat, I'm inclined to believe that there is no way to set this permission. The only way to see "Allowed", is to open the document with the owner password.
Please update your question as soon as you find a way to set this permission with Acrobat. I'm using Acrobat XI Pro.
Click this link if you want to see how to answer this question in iText 5.