Poppler.Annot

g GObject.Object GObject.Object Poppler.Annot Poppler.Annot GObject.Object->Poppler.Annot

Subclasses:

Poppler.AnnotMarkup, Poppler.AnnotMovie, Poppler.AnnotScreen

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_annot_type ()

get_border_width (width)

get_color ()

get_contents ()

get_flags ()

get_modified ()

get_name ()

get_page_index ()

get_rectangle ()

set_border_width (width)

set_color (poppler_color)

set_contents (contents)

set_flags (flags)

set_rectangle (poppler_rect)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Poppler.Annot(**kwargs)
Bases:

GObject.Object

Abstract:

No

get_annot_type()
Returns:

Poppler.AnnotType of self.

Return type:

Poppler.AnnotType

Gets the type of self

get_border_width(width)
Parameters:

width (float) – a valid pointer to a double

Returns:

true and sets border_width to the actual border width if a border is defined, otherwise returns false and sets border_width to 0.

Return type:

bool

Returns the border width of the annotation. Some PDF editors set a border width even if the border is not actually drawn.

New in version 24.12.0.

get_color()
Returns:

a new allocated Poppler.Color with the color values of self, or None. It must be freed with GLib.free() when done.

Return type:

Poppler.Color

Retrieves the color of self.

get_contents()
Returns:

a new allocated string with the contents of self. It must be freed with GLib.free() when done.

Return type:

str

Retrieves the contents of self.

get_flags()
Returns:

the flag field of self.

Return type:

Poppler.AnnotFlag

Retrieves the flag field specifying various characteristics of the self.

get_modified()
Returns:

a new allocated string with the last modification data of self. It must be freed with GLib.free() when done.

Return type:

str

Retrieves the last modification data of self. The returned string will be either a PDF format date or a text string. See also Poppler.date_parse()

get_name()
Returns:

a new allocated string with the name of self. It must be freed with GLib.free() when done.

Return type:

str

Retrieves the name of self.

get_page_index()
Returns:

page index or -1

Return type:

int

Returns the page index to which self is associated, or -1 if unknown

New in version 0.14.

get_rectangle()
Returns:

a Poppler.Rectangle to store the annotation’s coordinates

Return type:

poppler_rect: Poppler.Rectangle

Retrieves the rectangle representing the page coordinates where the annotation self is placed.

New in version 0.26.

set_border_width(width)
Parameters:

width (float) – the new border width

Sets the border width of the annotation. Since there is currently no mechanism in the GLib binding to control the appearance of the border width, this should generally only be used to disable the border, although the API might be completed in the future.

New in version 24.12.0.

set_color(poppler_color)
Parameters:

poppler_color (Poppler.Color or None) – a Poppler.Color, or None

Sets the color of self.

New in version 0.16.

set_contents(contents)
Parameters:

contents (str) – a text string containing the new contents

Sets the contents of self to the given value, replacing the current contents.

New in version 0.12.

set_flags(flags)
Parameters:

flags (Poppler.AnnotFlag) – a Poppler.AnnotFlag

Sets the flag field specifying various characteristics of the self.

New in version 0.22.

set_rectangle(poppler_rect)
Parameters:

poppler_rect (Poppler.Rectangle) – a Poppler.Rectangle with the new annotation’s coordinates

Move the annotation to the rectangle representing the page coordinates where the annotation self should be placed.

New in version 0.26.