pdftools_toolbox.pdf.content.group_element
Classes
|
- class pdftools_toolbox.pdf.content.group_element.GroupElement(handle)[source]
Bases:
ContentElement
- static copy_without_content(target_document: Document, group_element: GroupElement) GroupElement [source]
Copy a group element without copying its content
Create a new group element, taking a given group element as a template. The newly created group has the same properties, such as geometric transform, clipping, and soft mask, but it’s content is empty. The returned object is associated with the given target document but not yet part of it.
- Parameters:
targetDocument (pdftools_toolbox.pdf.document.Document) – the output document with which the returned object is associated
groupElement (pdftools_toolbox.pdf.content.group_element.GroupElement) – a group element of a different document
- Returns:
the new group element, associated with the current document
- Return type:
- Raises:
OSError – Error reading from the source document or writing to the target document
pdftools_toolbox.conformance_error.ConformanceError – The conformance level of the source document is not compatible with the conformance level of the target document.
ValueError – if the targetDocument argument has already been closed
ValueError – if the targetDocument argument is read-only
ValueError – the groupElement object is not associated with an input document
ValueError – the document associated with the groupElement object has already been closed
- property group: Group
This group element’s group object.
- Returns:
pdftools_toolbox.pdf.content.group.Group
- Raises:
StateError – the object has already been closed