LeenO computo metrico con LibreOffice  3.22.0
Il software libero per la gestione di computi metrici e contabilità lavori.
Membri pubblici | Attributi pubblici | Proprietà | Elenco di tutti i membri
Riferimenti per la classe pdf.PdfFileReader

Membri pubblici

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)
 

Attributi pubblici

 strict
 
 flattenedPages
 ensure that we're not trying to access an encrypted PDF assert not self.trailer.has_key("/Encrypt") Continua...
 
 resolvedObjects
 
 xrefIndex
 
 stream
 
 xref
 
 xref_objStm
 
 trailer
 

Proprietà

 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)
 

Descrizione dettagliata

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.

Documentazione dei costruttori e dei distruttori

◆ __init__()

def pdf.PdfFileReader.__init__ (   self,
  stream,
  strict = True,
  warndest = None,
  overwriteWarnings = True 
)

Definizione alla linea 1061 del file pdf.py.

Documentazione delle funzioni membro

◆ cacheGetIndirectObject()

def pdf.PdfFileReader.cacheGetIndirectObject (   self,
  generation,
  idnum 
)

Definizione alla linea 1669 del file pdf.py.

◆ cacheIndirectObject()

def pdf.PdfFileReader.cacheIndirectObject (   self,
  generation,
  idnum,
  obj 
)

Definizione alla linea 1676 del file pdf.py.

◆ decrypt()

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.

◆ getDestinationPageNumber()

def pdf.PdfFileReader.getDestinationPageNumber (   self,
  destination 
)
Retrieve page number of a given Destination object

:param Destination destination: The destination to get page number.
     Should be an instance of
     :class:`Destination<PyPDF2.pdf.Destination>`
:return: the page number or -1 if page not found
:rtype: int

Definizione alla linea 1408 del file pdf.py.

◆ getDocumentInfo()

def pdf.PdfFileReader.getDocumentInfo (   self)
Retrieves the PDF file's document information dictionary, if it exists.
Note that some PDF files use metadata streams instead of docinfo
dictionaries, and these metadata streams will not be accessed by this
function.

:return: the document information of this PDF file
:rtype: :class:`DocumentInformation<pdf.DocumentInformation>` or ``None`` if none exists.

Definizione alla linea 1089 del file pdf.py.

◆ getFields()

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.

◆ getFormTextFields()

def pdf.PdfFileReader.getFormTextFields (   self)
Retrieves form fields from the document with textual data (inputs, dropdowns)

Definizione alla linea 1276 del file pdf.py.

◆ getIsEncrypted()

def pdf.PdfFileReader.getIsEncrypted (   self)

Definizione alla linea 2043 del file pdf.py.

◆ getNamedDestinations()

def pdf.PdfFileReader.getNamedDestinations (   self,
  tree = None,
  retval = None 
)
Retrieves the named destinations present in the document.

:return: a dictionary which maps names to
    :class:`Destinations<PyPDF2.generic.Destination>`.
:rtype: dict

Definizione alla linea 1286 del file pdf.py.

◆ getNumPages()

def pdf.PdfFileReader.getNumPages (   self)
Calculates the number of pages in this PDF file.

:return: number of pages
:rtype: int
:raises PdfReadError: if file is encrypted and restrictions prevent
    this action.

Definizione alla linea 1131 del file pdf.py.

◆ getObject()

def pdf.PdfFileReader.getObject (   self,
  indirectReference 
)

Definizione alla linea 1584 del file pdf.py.

◆ getOutlines()

def pdf.PdfFileReader.getOutlines (   self,
  node = None,
  outlines = None 
)
Retrieves the document outline present in the document.

:return: a nested list of :class:`Destinations<PyPDF2.generic.Destination>`.

Definizione alla linea 1333 del file pdf.py.

◆ getPage()

def pdf.PdfFileReader.getPage (   self,
  pageNumber 
)
Retrieves a page by number from this PDF file.

:param int pageNumber: The page number to retrieve
    (pages begin at zero)
:return: a :class:`PageObject<pdf.PageObject>` instance.
:rtype: :class:`PageObject<pdf.PageObject>`

Definizione alla linea 1164 del file pdf.py.

◆ getPageLayout()

def pdf.PdfFileReader.getPageLayout (   self)
Get the page layout.
See :meth:`setPageLayout()<PdfFileWriter.setPageLayout>`
for a description of valid layouts.

:return: Page layout currently being used.
:rtype: ``str``, ``None`` if not specified

Definizione alla linea 1460 del file pdf.py.

◆ getPageMode()

def pdf.PdfFileReader.getPageMode (   self)
Get the page mode.
See :meth:`setPageMode()<PdfFileWriter.setPageMode>`
for a description of valid modes.

:return: Page mode currently being used.
:rtype: ``str``, ``None`` if not specified

Definizione alla linea 1478 del file pdf.py.

◆ getPageNumber()

def pdf.PdfFileReader.getPageNumber (   self,
  page 
)
Retrieve page number of a given PageObject

:param PageObject page: The page to get page number. Should be
    an instance of :class:`PageObject<PyPDF2.pdf.PageObject>`
:return: the page number or -1 if page not found
:rtype: int

Definizione alla linea 1395 del file pdf.py.

◆ getXmpMetadata()

def pdf.PdfFileReader.getXmpMetadata (   self)
Retrieves XMP (Extensible Metadata Platform) data from the PDF document
root.

:return: a :class:`XmpInformation<xmp.XmpInformation>`
    instance that can be used to access XMP metadata from the document.
:rtype: :class:`XmpInformation<xmp.XmpInformation>` or
    ``None`` if no metadata was found on the document root.

Definizione alla linea 1109 del file pdf.py.

◆ read()

def pdf.PdfFileReader.read (   self,
  stream 
)

Definizione alla linea 1685 del file pdf.py.

◆ readNextEndLine()

def pdf.PdfFileReader.readNextEndLine (   self,
  stream 
)

Definizione alla linea 1930 del file pdf.py.

◆ readObjectHeader()

def pdf.PdfFileReader.readObjectHeader (   self,
  stream 
)

Definizione alla linea 1649 del file pdf.py.

Documentazione dei membri dato

◆ flattenedPages

pdf.PdfFileReader.flattenedPages

ensure that we're not trying to access an encrypted PDF assert not self.trailer.has_key("/Encrypt")

Definizione alla linea 1074 del file pdf.py.

◆ resolvedObjects

pdf.PdfFileReader.resolvedObjects

Definizione alla linea 1075 del file pdf.py.

◆ stream

pdf.PdfFileReader.stream

Definizione alla linea 1085 del file pdf.py.

◆ strict

pdf.PdfFileReader.strict

Definizione alla linea 1073 del file pdf.py.

◆ trailer

pdf.PdfFileReader.trailer

Definizione alla linea 1718 del file pdf.py.

◆ xref

pdf.PdfFileReader.xref

Definizione alla linea 1716 del file pdf.py.

◆ xref_objStm

pdf.PdfFileReader.xref_objStm

Definizione alla linea 1717 del file pdf.py.

◆ xrefIndex

pdf.PdfFileReader.xrefIndex

Definizione alla linea 1076 del file pdf.py.

Documentazione delle proprietà

◆ documentInfo

pdf.PdfFileReader.documentInfo = property(lambda self: self.getDocumentInfo(), None, None)
static

Definizione alla linea 1106 del file pdf.py.

◆ isEncrypted

pdf.PdfFileReader.isEncrypted = property(lambda self: self.getIsEncrypted(), None, None)
static

Definizione alla linea 2046 del file pdf.py.

◆ namedDestinations

pdf.PdfFileReader.namedDestinations
static
Valore iniziale:
= property(lambda self:
self.getNamedDestinations(), None, None)

Definizione alla linea 1179 del file pdf.py.

◆ numPages

pdf.PdfFileReader.numPages = property(lambda self: self.getNumPages(), None, None)
static

Definizione alla linea 1158 del file pdf.py.

◆ outlines

pdf.PdfFileReader.outlines = property(lambda self: self.getOutlines(), None, None)
static

Definizione alla linea 1327 del file pdf.py.

◆ pageLayout

pdf.PdfFileReader.pageLayout = property(getPageLayout)
static

Definizione alla linea 1474 del file pdf.py.

◆ pageMode

pdf.PdfFileReader.pageMode = property(getPageMode)
static

Definizione alla linea 1492 del file pdf.py.

◆ pages

pdf.PdfFileReader.pages
static
Valore iniziale:
= property(lambda self: ConvertFunctionsToVirtualList(self.getNumPages, self.getPage),
None, None)

Definizione alla linea 1452 del file pdf.py.

◆ xmpMetadata

pdf.PdfFileReader.xmpMetadata = property(lambda self: self.getXmpMetadata(), None, None)
static

Definizione alla linea 1125 del file pdf.py.


La documentazione per questa classe è stata generata a partire dal seguente file: