pdftools_toolbox.pdf.annotations.custom_stamp
Classes
|
A stamp annotation with custom content |
- class pdftools_toolbox.pdf.annotations.custom_stamp.CustomStamp(handle)[source]
Bases:
Stamp
A stamp annotation with custom content
- static create(target_document: Document, bounding_box: Rectangle) CustomStamp [source]
Create a custom stamp annotation.
The returned custom stamp annotation’s appearance has an empty content with size equal to the given boundingBox, and with coordinate origin located at the bottom left corner. Use a
pdftools_toolbox.pdf.content.content_generator.ContentGenerator
to generate the stamp’s content prior to adding the stamp annotation to a page’s list of annotations.- Parameters:
targetDocument (pdftools_toolbox.pdf.document.Document) – The output document with which the returned object is associated.
boundingBox (pdftools_toolbox.geometry.real.rectangle.Rectangle) – The location of the annotation on the page.
- Returns:
The newly created custom stamp annotation.
- Return type:
- Raises:
ValueError – if the targetDocument has already been closed
ValueError – if the targetDocument is read-only
- property appearance: Group
The custom stamp’s visual appearance
- Returns:
pdftools_toolbox.pdf.content.group.Group
- Raises:
StateError – if the object has already been closed