![]() |
LeenO computo metrico con LibreOffice
3.22.0
Il software libero per la gestione di computi metrici e contabilità lavori.
|
Membri pubblici | |
| def | __init__ (self, pdf=None, indirectRef=None) |
| def | createBlankPage (pdf=None, width=None, height=None) |
| def | rotateClockwise (self, angle) |
| def | rotateCounterClockwise (self, angle) |
| def | getContents (self) |
| def | mergePage (self, page2) |
| def | mergeTransformedPage (self, page2, ctm, expand=False) |
| def | mergeScaledPage (self, page2, scale, expand=False) |
| def | mergeRotatedPage (self, page2, rotation, expand=False) |
| def | mergeTranslatedPage (self, page2, tx, ty, expand=False) |
| def | mergeRotatedTranslatedPage (self, page2, rotation, tx, ty, expand=False) |
| def | mergeRotatedScaledPage (self, page2, rotation, scale, expand=False) |
| def | mergeScaledTranslatedPage (self, page2, scale, tx, ty, expand=False) |
| def | mergeRotatedScaledTranslatedPage (self, page2, rotation, scale, tx, ty, expand=False) |
| def | addTransformation (self, ctm) |
| Applys a transformation matrix the page. Continua... | |
| def | scale (self, sx, sy) |
| def | scaleBy (self, factor) |
| def | scaleTo (self, width, height) |
| def | compressContentStreams (self) |
| def | extractText (self) |
Membri pubblici ereditati da generic.DictionaryObject | |
| def | raw_get (self, key) |
| def | __setitem__ (self, key, value) |
| def | setdefault (self, key, value=None) |
| def | __getitem__ (self, key) |
| def | getXmpMetadata (self) |
| Retrieves XMP (Extensible Metadata Platform) data relevant to the this object, if available. Continua... | |
| def | writeToStream (self, stream, encryption_key) |
| def | readFromStream (stream, pdf) |
Membri pubblici ereditati da generic.PdfObject | |
| def | getObject (self) |
Attributi pubblici | |
| indirectRef | |
Attributi pubblici statici | |
| createBlankPage = staticmethod(createBlankPage) | |
| mediaBox = createRectangleAccessor("/MediaBox", ()) | |
| cropBox = createRectangleAccessor("/CropBox", ("/MediaBox",)) | |
| bleedBox = createRectangleAccessor("/BleedBox", ("/CropBox", "/MediaBox")) | |
| trimBox = createRectangleAccessor("/TrimBox", ("/CropBox", "/MediaBox")) | |
| artBox = createRectangleAccessor("/ArtBox", ("/CropBox", "/MediaBox")) | |
Attributi pubblici statici ereditati da generic.DictionaryObject | |
| readFromStream = staticmethod(readFromStream) | |
Altri membri ereditati | |
Proprietà ereditati da generic.DictionaryObject | |
| xmpMetadata = property(lambda self: self.getXmpMetadata(), None, None) | |
| Read-only property that accesses the {getXmpData} function. Continua... | |
This class represents a single page within a PDF file. Typically this
object will be created by accessing the
:meth:`getPage()<PyPDF2.PdfFileReader.getPage>` method of the
:class:`PdfFileReader<PyPDF2.PdfFileReader>` class, but it is
also possible to create an empty page with the
:meth:`createBlankPage()<PageObject.createBlankPage>` static method.
:param pdf: PDF file the page belongs to.
:param indirectRef: Stores the original indirect reference to
this object in its source PDF
| def pdf.PageObject.__init__ | ( | self, | |
pdf = None, |
|||
indirectRef = None |
|||
| ) |
| def pdf.PageObject.addTransformation | ( | self, | |
| ctm | |||
| ) |
Applys a transformation matrix the page.
| ctm | A 6 elements tuple containing the operands of the transformation matrix Applies a transformation matrix to the page.
:param tuple ctm: A 6-element tuple containing the operands of the
transformation matrix.
|
| def pdf.PageObject.compressContentStreams | ( | self | ) |
| def pdf.PageObject.createBlankPage | ( | pdf = None, |
|
width = None, |
|||
height = None |
|||
| ) |
Returns a new blank page.
If ``width`` or ``height`` is ``None``, try to get the page size
from the last page of *pdf*.
:param pdf: PDF file the page belongs to
:param float width: The width of the new page expressed in default user
space units.
:param float height: The height of the new page expressed in default user
space units.
:return: the new blank page:
:rtype: :class:`PageObject<PageObject>`
:raises PageSizeNotDefinedError: if ``pdf`` is ``None`` or contains
no page
| def pdf.PageObject.extractText | ( | self | ) |
Locate all text drawing commands, in the order they are provided in the content stream, and extract the text. This works well for some PDF files, but poorly for others, depending on the generator used. This will be refined in the future. Do not rely on the order of text coming out of this function, as it will change if this function is made more sophisticated. :return: a unicode string object.
| def pdf.PageObject.getContents | ( | self | ) |
| def pdf.PageObject.mergePage | ( | self, | |
| page2 | |||
| ) |
Merges the content streams of two pages into one. Resource references
(i.e. fonts) are maintained from both pages. The mediabox/cropbox/etc
of this page are not altered. The parameter page's content stream will
be added to the end of this page's content stream, meaning that it will
be drawn after, or "on top" of this page.
:param PageObject page2: The page to be merged into this one. Should be
an instance of :class:`PageObject<PageObject>`.
| def pdf.PageObject.mergeRotatedPage | ( | self, | |
| page2, | |||
| rotation, | |||
expand = False |
|||
| ) |
This is similar to mergePage, but the stream to be merged is rotated
by appling a transformation matrix.
:param PageObject page2: the page to be merged into this one. Should be
an instance of :class:`PageObject<PageObject>`.
:param float rotation: The angle of the rotation, in degrees
:param bool expand: Whether the page should be expanded to fit the
dimensions of the page to be merged.
| def pdf.PageObject.mergeRotatedScaledPage | ( | self, | |
| page2, | |||
| rotation, | |||
| scale, | |||
expand = False |
|||
| ) |
This is similar to mergePage, but the stream to be merged is rotated
and scaled by appling a transformation matrix.
:param PageObject page2: the page to be merged into this one. Should be
an instance of :class:`PageObject<PageObject>`.
:param float rotation: The angle of the rotation, in degrees
:param float scale: The scaling factor
:param bool expand: Whether the page should be expanded to fit the
dimensions of the page to be merged.
| def pdf.PageObject.mergeRotatedScaledTranslatedPage | ( | self, | |
| page2, | |||
| rotation, | |||
| scale, | |||
| tx, | |||
| ty, | |||
expand = False |
|||
| ) |
This is similar to mergePage, but the stream to be merged is translated,
rotated and scaled by appling a transformation matrix.
:param PageObject page2: the page to be merged into this one. Should be
an instance of :class:`PageObject<PageObject>`.
:param float tx: The translation on X axis
:param float ty: The translation on Y axis
:param float rotation: The angle of the rotation, in degrees
:param float scale: The scaling factor
:param bool expand: Whether the page should be expanded to fit the
dimensions of the page to be merged.
| def pdf.PageObject.mergeRotatedTranslatedPage | ( | self, | |
| page2, | |||
| rotation, | |||
| tx, | |||
| ty, | |||
expand = False |
|||
| ) |
This is similar to mergePage, but the stream to be merged is rotated
and translated by appling a transformation matrix.
:param PageObject page2: the page to be merged into this one. Should be
an instance of :class:`PageObject<PageObject>`.
:param float tx: The translation on X axis
:param float ty: The translation on Y axis
:param float rotation: The angle of the rotation, in degrees
:param bool expand: Whether the page should be expanded to fit the
dimensions of the page to be merged.
| def pdf.PageObject.mergeScaledPage | ( | self, | |
| page2, | |||
| scale, | |||
expand = False |
|||
| ) |
This is similar to mergePage, but the stream to be merged is scaled
by appling a transformation matrix.
:param PageObject page2: The page to be merged into this one. Should be
an instance of :class:`PageObject<PageObject>`.
:param float scale: The scaling factor
:param bool expand: Whether the page should be expanded to fit the
dimensions of the page to be merged.
| def pdf.PageObject.mergeScaledTranslatedPage | ( | self, | |
| page2, | |||
| scale, | |||
| tx, | |||
| ty, | |||
expand = False |
|||
| ) |
This is similar to mergePage, but the stream to be merged is translated
and scaled by appling a transformation matrix.
:param PageObject page2: the page to be merged into this one. Should be
an instance of :class:`PageObject<PageObject>`.
:param float scale: The scaling factor
:param float tx: The translation on X axis
:param float ty: The translation on Y axis
:param bool expand: Whether the page should be expanded to fit the
dimensions of the page to be merged.
| def pdf.PageObject.mergeTransformedPage | ( | self, | |
| page2, | |||
| ctm, | |||
expand = False |
|||
| ) |
This is similar to mergePage, but a transformation matrix is
applied to the merged stream.
:param PageObject page2: The page to be merged into this one. Should be
an instance of :class:`PageObject<PageObject>`.
:param tuple ctm: a 6-element tuple containing the operands of the
transformation matrix
:param bool expand: Whether the page should be expanded to fit the dimensions
of the page to be merged.
| def pdf.PageObject.mergeTranslatedPage | ( | self, | |
| page2, | |||
| tx, | |||
| ty, | |||
expand = False |
|||
| ) |
This is similar to mergePage, but the stream to be merged is translated
by appling a transformation matrix.
:param PageObject page2: the page to be merged into this one. Should be
an instance of :class:`PageObject<PageObject>`.
:param float tx: The translation on X axis
:param float ty: The translation on Y axis
:param bool expand: Whether the page should be expanded to fit the
dimensions of the page to be merged.
| def pdf.PageObject.rotateClockwise | ( | self, | |
| angle | |||
| ) |
| def pdf.PageObject.rotateCounterClockwise | ( | self, | |
| angle | |||
| ) |
| def pdf.PageObject.scale | ( | self, | |
| sx, | |||
| sy | |||
| ) |
| def pdf.PageObject.scaleBy | ( | self, | |
| factor | |||
| ) |
| def pdf.PageObject.scaleTo | ( | self, | |
| width, | |||
| height | |||
| ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
1.8.16