List Permissions

The PDF specification defines a set of permissions that may be set for encrypted documents.This command prints the current permission set. Have a look at some examples.

Usage

  1. pdfcpu permissions list [-v(erbose)|vv] [-upw userpw] [-opw ownerpw] inFile

Flags

namedescriptionrequired
verboseturn on loggingno
vvverbose loggingno
upwuser passwordno
opwowner passwordno

Arguments

namedescriptionrequired
inFilePDF input fileyes

Examples

pdfcpu does not require any password for listing the permissions of an encrypted document unless the user password is set:

  1. pdfcpu encrypt -opw opw enc.pdf
  2. writing enc.pdf ...
  3. pdfcpu perm list enc.pdf
  4. permission bits: 0
  5. Bit 3: false (print(rev2), print quality(rev>=3))
  6. Bit 4: false (modify other than controlled by bits 6,9,11)
  7. Bit 5: false (extract(rev2), extract other than controlled by bit 10(rev>=3))
  8. Bit 6: false (add or modify annotations)
  9. Bit 9: false (fill in form fields(rev>=3)
  10. Bit 10: false (extract(rev>=3))
  11. Bit 11: false (modify(rev>=3))
  12. Bit 12: false (print high-level(rev>=3))

If both passwords are set, you need to provide either one to list permissions:

  1. pdfcpu encrypt -opw opw -upw upw enc.pdf
  2. writing enc.pdf ...
  3. pdfcpu perm list enc.pdf
  4. Please provide the correct password
  5. pdfcpu perm list -upw upw enc.pdf
  6. permission bits: 0
  7. Bit 3: false (print(rev2), print quality(rev>=3))
  8. Bit 4: false (modify other than controlled by bits 6,9,11)
  9. Bit 5: false (extract(rev2), extract other than controlled by bit 10(rev>=3))
  10. Bit 6: false (add or modify annotations)
  11. Bit 9: false (fill in form fields(rev>=3)
  12. Bit 10: false (extract(rev>=3))
  13. Bit 11: false (modify(rev>=3))
  14. Bit 12: false (print high-level(rev>=3))
  15. pdfcpu perm list -opw opw enc.pdf
  16. permission bits: 0
  17. Bit 3: false (print(rev2), print quality(rev>=3))
  18. Bit 4: false (modify other than controlled by bits 6,9,11)
  19. Bit 5: false (extract(rev2), extract other than controlled by bit 10(rev>=3))
  20. Bit 6: false (add or modify annotations)
  21. Bit 9: false (fill in form fields(rev>=3)
  22. Bit 10: false (extract(rev>=3))
  23. Bit 11: false (modify(rev>=3))
  24. Bit 12: false (print high-level(rev>=3))

If only the user password is set then that’s also what you need to provide:

  1. pdfcpu encrypt -upw upw enc.pdf
  2. writing enc.pdf ...
  3. pdfcpu perm list enc.pdf
  4. Please provide the correct password
  5. pdfcpu perm list -upw upw enc.pdf
  6. permission bits: 0
  7. Bit 3: false (print(rev2), print quality(rev>=3))
  8. Bit 4: false (modify other than controlled by bits 6,9,11)
  9. Bit 5: false (extract(rev2), extract other than controlled by bit 10(rev>=3))
  10. Bit 6: false (add or modify annotations)
  11. Bit 9: false (fill in form fields(rev>=3)
  12. Bit 10: false (extract(rev>=3))
  13. Bit 11: false (modify(rev>=3))
  14. Bit 12: false (print high-level(rev>=3))