|
def | __init__ (self, stream, strict=True, warndest=None, overwriteWarnings=True) |
|
def | getDocumentInfo (self) |
|
def | getXmpMetadata (self) |
|
def | getNumPages (self) |
|
def | getPage (self, pageNumber) |
|
def | getFields (self, tree=None, retval=None, fileobj=None) |
|
def | getFormTextFields (self) |
|
def | getNamedDestinations (self, tree=None, retval=None) |
|
def | getOutlines (self, node=None, outlines=None) |
|
def | getPageNumber (self, page) |
|
def | getDestinationPageNumber (self, destination) |
|
def | getPageLayout (self) |
|
def | getPageMode (self) |
|
def | getObject (self, indirectReference) |
|
def | readObjectHeader (self, stream) |
|
def | cacheGetIndirectObject (self, generation, idnum) |
|
def | cacheIndirectObject (self, generation, idnum, obj) |
|
def | read (self, stream) |
|
def | readNextEndLine (self, stream) |
|
def | decrypt (self, password) |
|
def | getIsEncrypted (self) |
|
|
| documentInfo = property(lambda self: self.getDocumentInfo(), None, None) |
|
| xmpMetadata = property(lambda self: self.getXmpMetadata(), None, None) |
|
| numPages = property(lambda self: self.getNumPages(), None, None) |
|
| namedDestinations |
|
| outlines = property(lambda self: self.getOutlines(), None, None) |
|
| pages |
|
| pageLayout = property(getPageLayout) |
|
| pageMode = property(getPageMode) |
|
| isEncrypted = property(lambda self: self.getIsEncrypted(), None, None) |
|
Initializes a PdfFileReader object. This operation can take some time, as
the PDF stream's cross-reference tables are read into memory.
:param stream: A File object or an object that supports the standard read
and seek methods similar to a File object. Could also be a
string representing a path to a PDF file.
:param bool strict: Determines whether user should be warned of all
problems and also causes some correctable problems to be fatal.
Defaults to ``True``.
:param warndest: Destination for logging warnings (defaults to
``sys.stderr``).
:param bool overwriteWarnings: Determines whether to override Python's
``warnings.py`` module with a custom implementation (defaults to
``True``).
Definizione alla linea 1044 del file pdf.py.
def pdf.PdfFileReader.decrypt |
( |
|
self, |
|
|
|
password |
|
) |
| |
When using an encrypted / secured PDF file with the PDF Standard
encryption handler, this function will allow the file to be decrypted.
It checks the given password against the document's user password and
owner password, and then stores the resulting decryption key if either
password is correct.
It does not matter which password was matched. Both passwords provide
the correct decryption key that will allow the document to be used with
this library.
:param str password: The password to match.
:return: ``0`` if the password failed, ``1`` if the password matched the user
password, and ``2`` if the password matched the owner password.
:rtype: int
:raises NotImplementedError: if document uses an unsupported encryption
method.
Definizione alla linea 1965 del file pdf.py.
def pdf.PdfFileReader.getFields |
( |
|
self, |
|
|
|
tree = None , |
|
|
|
retval = None , |
|
|
|
fileobj = None |
|
) |
| |
Extracts field data if this PDF contains interactive form fields.
The *tree* and *retval* parameters are for recursive use.
:param fileobj: A file object (usually a text file) to write
a report to on all interactive form fields found.
:return: A dictionary where each key is a field name, and each
value is a :class:`Field<PyPDF2.generic.Field>` object. By
default, the mapping name is used for keys.
:rtype: dict, or ``None`` if form data could not be located.
Definizione alla linea 1189 del file pdf.py.
La documentazione per questa classe è stata generata a partire dal seguente file: