Support models¶
Support models are abstracts over “raw” objects within a Pdf. For example, a page
in a PDF is a Dictionary with set to /Type
of /Page
. The Dictionary in
that case is the “raw” object. Upon establishing what type of object it is, we
can wrap it with a support model that adds features to ensure consistency with
the PDF specification.
pikepdf does not currently apply support models to “raw” objects automatically, but might do so in a future release (this would break backward compatibility).
For example, to initialize a Page
support model:
from pikepdf import Pdf, Page
Pdf = open(...)
page_support_model = Page(pdf.pages[0])
-
class
pikepdf.models.
EncryptionMethod
¶ Describes which encryption method was used on a particular part of a PDF. These values are returned by
pikepdf.EncryptionInfo
but are not currently used to specify how encryption is requested.-
none
¶ Data was not encrypted.
-
unknown
¶ An unknown algorithm was used.
-
rc4
¶ The RC4 encryption algorithm was used (obsolete).
-
aes
¶ The AES-based algorithm was used as described in the PDF 1.7 reference manual.
-
aesv3
¶ An improved version of the AES-based algorithm was used as described in the Adobe Supplement to the ISO 32000, requiring PDF 1.7 extension level 3. This algorithm still uses AES, but allows both AES-128 and AES-256, and improves how the key is derived from the password.
-