Decoded /P permission flags from a PDF's standard encryption dictionary
(ISO 32000-1 §7.6.3.2, Table 22).
Obtain it with PdfElixide.Document.permissions/1, which answers {:ok, nil}
for a document that is not encrypted (and therefore has no permission
dictionary).
Per the PDF specification these flags are advisory — conforming readers are not required to enforce them. They are surfaced so that callers who wish to honor them can.
On a revision 2 document, :fill_forms, :accessibility, :assemble
and :print_high_res report bits that do not define separate permissions at
that revision. Accessibility follows :copy; use :print_low_res, :modify,
:copy and :annotate to interpret the restrictions. This affects documents
from other producers only — PdfElixide.Editor writes no revision-2 document.
Fields
:print_low_res— print (low resolution).:modify— modify contents (other than annotation / form fill).:copy— copy or extract text and graphics.:annotate— add or modify annotations and fill form fields.:fill_forms— fill interactive form fields (revision ≥ 3).:accessibility— extract text/graphics for accessibility (revision ≥ 3).:assemble— insert, rotate, or delete pages (revision ≥ 3).:print_high_res— print at high resolution (revision ≥ 3).:raw— the raw two's-complement/Pinteger, for callers that need the undecoded value. The specification requires the unused high bits to be set, so a permissive document reads as a large negative number rather than as zero.