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

Membri pubblici

def __init__ (self, strict=True)
 
def merge (self, position, fileobj, bookmark=None, pages=None, import_bookmarks=True)
 
def append (self, fileobj, bookmark=None, pages=None, import_bookmarks=True)
 
def write (self, fileobj)
 
def close (self)
 
def addMetadata (self, infos)
 
def setPageLayout (self, layout)
 
def setPageMode (self, mode)
 
def findBookmark (self, bookmark, root=None)
 
def addBookmark (self, title, pagenum, parent=None)
 
def addNamedDestination (self, title, pagenum)
 

Attributi pubblici

 inputs
 
 pages
 
 output
 
 bookmarks
 
 named_dests
 
 id_count
 
 strict
 

Descrizione dettagliata

Initializes a PdfFileMerger object. PdfFileMerger merges multiple PDFs
into a single PDF. It can concatenate, slice, insert, or any combination
of the above.

See the functions :meth:`merge()<merge>` (or :meth:`append()<append>`)
and :meth:`write()<write>` for usage information.

:param bool strict: Determines whether user should be warned of all
        problems and also causes some correctable problems to be fatal.
        Defaults to ``True``.

Definizione alla linea 56 del file merger.py.

Documentazione dei costruttori e dei distruttori

◆ __init__()

def merger.PdfFileMerger.__init__ (   self,
  strict = True 
)

Definizione alla linea 70 del file merger.py.

Documentazione delle funzioni membro

◆ addBookmark()

def merger.PdfFileMerger.addBookmark (   self,
  title,
  pagenum,
  parent = None 
)
Add a bookmark to this PDF file.

:param str title: Title to use for this bookmark.
:param int pagenum: Page number this bookmark will point to.
:param parent: A reference to a parent bookmark to create nested
    bookmarks.

Definizione alla linea 476 del file merger.py.

◆ addMetadata()

def merger.PdfFileMerger.addMetadata (   self,
  infos 
)
Add custom metadata to the output.

:param dict infos: a Python dictionary where each key is a field
    and each value is your new metadata.
    Example: ``{u'/Title': u'My title'}``

Definizione alla linea 248 del file merger.py.

◆ addNamedDestination()

def merger.PdfFileMerger.addNamedDestination (   self,
  title,
  pagenum 
)
Add a destination to the output.

:param str title: Title to use
:param int pagenum: Page number this destination points at.

Definizione alla linea 507 del file merger.py.

◆ append()

def merger.PdfFileMerger.append (   self,
  fileobj,
  bookmark = None,
  pages = None,
  import_bookmarks = True 
)
Identical to the :meth:`merge()<merge>` method, but assumes you want to concatenate
all pages onto the end of the file instead of specifying a position.

:param fileobj: 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 str bookmark: Optionally, you may specify a bookmark to be applied at
    the beginning of the included file by supplying the text of the bookmark.

:param pages: can be a :ref:`Page Range <page-range>` or a ``(start, stop[, step])`` tuple
    to merge only the specified range of pages from the source
    document into the output document.

:param bool import_bookmarks: You may prevent the source document's bookmarks
    from being imported by specifying this as ``False``.

Definizione alla linea 183 del file merger.py.

◆ close()

def merger.PdfFileMerger.close (   self)
Shuts all file descriptors (input and output) and clears all memory
usage.

Definizione alla linea 235 del file merger.py.

◆ findBookmark()

def merger.PdfFileMerger.findBookmark (   self,
  bookmark,
  root = None 
)

Definizione alla linea 462 del file merger.py.

◆ merge()

def merger.PdfFileMerger.merge (   self,
  position,
  fileobj,
  bookmark = None,
  pages = None,
  import_bookmarks = True 
)
Merges the pages from the given file into the output file at the
specified page number.

:param int position: The *page number* to insert this file. File will
    be inserted after the given number.

:param fileobj: 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 str bookmark: Optionally, you may specify a bookmark to be applied at
    the beginning of the included file by supplying the text of the bookmark.

:param pages: can be a :ref:`Page Range <page-range>` or a ``(start, stop[, step])`` tuple
    to merge only the specified range of pages from the source
    document into the output document.

:param bool import_bookmarks: You may prevent the source document's bookmarks
    from being imported by specifying this as ``False``.

Definizione alla linea 79 del file merger.py.

◆ setPageLayout()

def merger.PdfFileMerger.setPageLayout (   self,
  layout 
)
Set the page layout

:param str layout: The page layout to be used

Valid layouts are:
     /NoLayout        Layout explicitly not specified
     /SinglePage      Show one page at a time
     /OneColumn       Show one column at a time
     /TwoColumnLeft   Show pages in two columns, odd-numbered pages on the left
     /TwoColumnRight  Show pages in two columns, odd-numbered pages on the right
     /TwoPageLeft     Show two pages at a time, odd-numbered pages on the left
     /TwoPageRight    Show two pages at a time, odd-numbered pages on the right

Definizione alla linea 258 del file merger.py.

◆ setPageMode()

def merger.PdfFileMerger.setPageMode (   self,
  mode 
)
Set the page mode.

:param str mode: The page mode to use.

Valid modes are:
    /UseNone         Do not show outlines or thumbnails panels
    /UseOutlines     Show outlines (aka bookmarks) panel
    /UseThumbs       Show page thumbnails panel
    /FullScreen      Fullscreen view
    /UseOC           Show Optional Content Group (OCG) panel
    /UseAttachments  Show attachments panel

Definizione alla linea 275 del file merger.py.

◆ write()

def merger.PdfFileMerger.write (   self,
  fileobj 
)
Writes all data that has been merged to the given output file.

:param fileobj: Output file. Can be a filename or any kind of
    file-like object.

Definizione alla linea 205 del file merger.py.

Documentazione dei membri dato

◆ bookmarks

merger.PdfFileMerger.bookmarks

Definizione alla linea 74 del file merger.py.

◆ id_count

merger.PdfFileMerger.id_count

Definizione alla linea 76 del file merger.py.

◆ inputs

merger.PdfFileMerger.inputs

Definizione alla linea 71 del file merger.py.

◆ named_dests

merger.PdfFileMerger.named_dests

Definizione alla linea 75 del file merger.py.

◆ output

merger.PdfFileMerger.output

Definizione alla linea 73 del file merger.py.

◆ pages

merger.PdfFileMerger.pages

Definizione alla linea 72 del file merger.py.

◆ strict

merger.PdfFileMerger.strict

Definizione alla linea 77 del file merger.py.


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