Method: PDF::Core::Annotations#text_annotation

Defined in:
lib/pdf/core/annotations.rb

#text_annotation(rect, contents, options = {}) ⇒ Hash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

A convenience method for creating ‘Text` annotations.

Parameters:

  • rect (Array<Numeric>)

    An array of four numbers, describing the bounds of the annotation.

  • contents (String)

    Contents of the annotation

Returns:

  • (Hash)

    Annotation dictionary



64
65
66
67
# File 'lib/pdf/core/annotations.rb', line 64

def text_annotation(rect, contents, options = {})
  options = options.merge(Subtype: :Text, Rect: rect, Contents: contents)
  annotate(options)
end