pdftools_toolbox.pdf.annotations.sticky_note
Classes
|
A sticky note annotation |
- class pdftools_toolbox.pdf.annotations.sticky_note.StickyNote(handle)[source]
Bases:
MarkupAnnotation
A sticky note annotation
- static create(target_document: Document, top_left: Point, content: str | None, paint: Paint) StickyNote [source]
Create a sticky note annotation.
The returned sticky note annotation is not yet part of any page. It can be added to a page’s list of annotations.
- Parameters:
targetDocument (pdftools_toolbox.pdf.document.Document) – The output document with which the returned object is associated
topLeft (pdftools_toolbox.geometry.real.point.Point) – The location of the annotation’s upper left corner on the page
content (Optional[str]) – The text content
paint (pdftools_toolbox.pdf.content.paint.Paint) – The paint for the sticky note icon.
- Returns:
The newly created sticky note annotation
- Return type:
- Raises:
ValueError – if the targetDocument has already been closed
ValueError – if the targetDocument is read-only
ValueError – if the color space of the paint argument is not a device color space
ValueError – if the paint has a non-None
pdftools_toolbox.pdf.content.paint.Paint.transparency
withpdftools_toolbox.pdf.content.transparency.Transparency.blend_mode
other thanpdftools_toolbox.pdf.content.blend_mode.BlendMode.NORMAL
ValueError – if the paint argument is not associated with the targetDocument
- property paint: Paint
The paint for the icon and the popup
- Returns:
pdftools_toolbox.pdf.content.paint.Paint
- Raises:
StateError – if the object has already been closed
pdftools_toolbox.corrupt_error.CorruptError – if the PDF is corrupt and the annotation’s paint cannot be read
- property popup: Popup | None
The pop-up
- Returns:
Optional[pdftools_toolbox.pdf.annotations.popup.Popup]
- Raises:
StateError – if the object has already been closed