PdfAnnotation
Represents a base annotation in a PDF document.
from nutrient import PdfAnnotationMethods
set_border_style
def set_border_style(self, value: PdfBorderStyle) -> NoneSets the border style of the annotation.
Parameters:
| Name | Type | Description |
|---|---|---|
value | PdfBorderStyle | The value to set for the BorderStyle property. |
set_border_width
def set_border_width(self, value: float) -> NoneSets the border width of the annotation in points.
Parameters:
| Name | Type | Description |
|---|---|---|
value | float | The value to set for the BorderWidth property. |
set_color
def set_color(self, value: Color) -> NoneSets the annotation color.
Parameters:
| Name | Type | Description |
|---|---|---|
value | Color | The value to set for the Color property. |
set_contents
def set_contents(self, value: str) -> NoneSets the annotation’s text contents.
Parameters:
| Name | Type | Description |
|---|---|---|
value | str | The value to set for the Contents property. |
set_is_hidden
def set_is_hidden(self, value: bool) -> NoneSets whether the annotation is hidden.
Parameters:
| Name | Type | Description |
|---|---|---|
value | bool | The value to set for the IsHidden property. |
set_is_printable
def set_is_printable(self, value: bool) -> NoneSets whether the annotation is printable.
Parameters:
| Name | Type | Description |
|---|---|---|
value | bool | The value to set for the IsPrintable property. |
set_rect
def set_rect(self, value: Any) -> NoneSets the rectangle that defines the location and size of the annotation on the page.
Parameters:
| Name | Type | Description |
|---|---|---|
value | Any | The value to set for the Rect property. |
set_title
def set_title(self, value: str) -> NoneSets the annotation’s title/author.
Parameters:
| Name | Type | Description |
|---|---|---|
value | str | The value to set for the Title property. |
Properties
border_style
@propertydef border_style(self) -> PdfBorderStyleGets the border style of the annotation.
Type: PdfBorderStyle
Read-only property.
border_width
@propertydef border_width(self) -> floatGets the border width of the annotation in points.
Type: float
Read-only property.
color
@propertydef color(self) -> ColorGets the annotation color.
Type: Color
Read-only property.
contents
@propertydef contents(self) -> strGets the annotation’s text contents.
Type: str
Read-only property.
index
@propertydef index(self) -> intGets the 0-based index of this annotation in the page’s annotation array.
Type: int
Read-only property.
is_hidden
@propertydef is_hidden(self) -> boolGets whether the annotation is hidden.
Type: bool
Read-only property.
is_printable
@propertydef is_printable(self) -> boolGets whether the annotation is printable.
Type: bool
Read-only property.
modification_date
@propertydef modification_date(self) -> strGets the annotation’s modification date.
Type: str
Read-only property.
name
@propertydef name(self) -> strGets the annotation’s unique name/identifier.
Type: str
Read-only property.
rect
@propertydef rect(self) -> AnyGets the rectangle that defines the location and size of the annotation on the page.
Type: Any
Read-only property.
sub_type
@propertydef sub_type(self) -> strGets the annotation subtype (e.g., “Text”, “Link”, “Highlight”).
Type: str
Read-only property.
title
@propertydef title(self) -> strGets the annotation’s title/author.
Type: str
Read-only property.