pdftools_toolbox.pdf.annotations.rectangle_annotation

Classes

RectangleAnnotation(handle)

A rectangle drawing annotation

class pdftools_toolbox.pdf.annotations.rectangle_annotation.RectangleAnnotation(handle)[source]

Bases: DrawingAnnotation

A rectangle drawing annotation

static create(target_document: Document, bounding_box: Rectangle, stroke: Stroke | None, fill: Paint | None) RectangleAnnotation[source]

Create a rectangle annotation.

The returned rectangle annotation is not yet part of any page. It can be added to a page’s list of annotations.

Parameters:
Returns:

The newly created rectangle annotation.

Return type:

pdftools_toolbox.pdf.annotations.rectangle_annotation.RectangleAnnotation

Raises:
property fill: Paint

The filling paint

Returns:

pdftools_toolbox.pdf.content.paint.Paint

Raises:

StateError – if the object has already been closed