PdfElixide.Document.Permissions (pdf_elixide v0.9.0)

Copy Markdown View Source

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 returns 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.

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 /P integer, for callers that need the undecoded value.

Summary

Types

t()

@type t() :: %PdfElixide.Document.Permissions{
  accessibility: boolean(),
  annotate: boolean(),
  assemble: boolean(),
  copy: boolean(),
  fill_forms: boolean(),
  modify: boolean(),
  print_high_res: boolean(),
  print_low_res: boolean(),
  raw: integer()
}