Class: Poppler::Annot

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Direct Known Subclasses

AnnotMarkup, AnnotMovie, AnnotScreen

Instance Method Summary collapse

Instance Method Details

#annot_type ⇒ Poppler::AnnotType

Gets the type of poppler_annot

Returns:

#border_width=(width) ⇒ nil

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.

Parameters:

  • width (Float) —

    the new border width

Returns:

  • (nil)

#color ⇒ Poppler::Color

Retrieves the color of poppler_annot.

Returns:

  • (Poppler::Color) —

    a new allocated Poppler::Color with the color values of
    poppler_annot, or nil. It must be freed with g_free() when done.

#color=(poppler_color) ⇒ nil

Sets the color of poppler_annot.

Parameters:

Returns:

  • (nil)

#contents ⇒ String

Retrieves the contents of poppler_annot.

Returns:

  • (String) —

    a new allocated string with the contents of poppler_annot. It
    must be freed with g_free() when done.

#contents=(contents) ⇒ nil

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

Parameters:

  • contents (String) —

    a text string containing the new contents

Returns:

  • (nil)

#flags ⇒ Poppler::AnnotFlag

Retrieves the flag field specifying various characteristics of the
poppler_annot.

Returns:

#flags=(flags) ⇒ nil

Sets the flag field specifying various characteristics of the
poppler_annot.

Parameters:

Returns:

  • (nil)

#get_border_width(width) ⇒ Boolean

Returns the border width of the annotation. Some PDF editors set a border
width even if the border is not actually drawn.
is defined, otherwise returns false and sets border_width to 0.

Parameters:

  • width (Float) —

    a valid pointer to a double

Returns:

  • (Boolean) —

    true and sets border_width to the actual border width if a border

#get_rectangle(poppler_rect) ⇒ nil

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

Parameters:

  • poppler_rect (Poppler::Rectangle) —

    a Poppler::Rectangle to store the annotation's coordinates

Returns:

  • (nil)

#modified ⇒ String

Retrieves the last modification data of poppler_annot. The returned
string will be either a PDF format date or a text string.
See also #poppler_date_parse()

Returns:

  • (String) —

    a new allocated string with the last modification data of
    poppler_annot. It must be freed with g_free() when done.

#name ⇒ String

Retrieves the name of poppler_annot.

Returns:

  • (String) —

    a new allocated string with the name of poppler_annot. It must
    be freed with g_free() when done.

#page_index ⇒ Integer

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

Returns:

  • (Integer) —

    page index or -1

#rectangle=(poppler_rect) ⇒ nil

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

Parameters:

  • poppler_rect (Poppler::Rectangle) —

    a Poppler::Rectangle with the new annotation's coordinates

Returns:

  • (nil)