pdftools_toolbox.pdf.content.group_element

Classes

GroupElement(handle)

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:
Returns:

the new group element, associated with the current document

Return type:

pdftools_toolbox.pdf.content.group_element.GroupElement

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