|
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) |
|
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.
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.
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.
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.
La documentazione per questa classe è stata generata a partire dal seguente file: