class HexaPDF:: Type:: Annotation
Parent | HexaPDF::Dictionary |
---|---|
Extended With |
HexaPDF::Utils::BitField |
Annotations
are used to associate objects like notes, sounds or movies with a location on a PDF page or allow the user to interact with a PDF document using a keyboard or mouse.
See: PDF2.0 s12.5
Field Definitions
Name | Type/Allowed Values | Required | Default Value |
---|---|---|---|
Type | Symbol | false | :Annot |
Subtype | Symbol | true | nil |
Rect | HexaPDF::Rectangle or Array | true | nil |
Contents | String | false | nil |
P | HexaPDF::Dictionary or Hash | false | nil |
NM | String | false | nil |
M | HexaPDF::DictionaryFields::PDFDate or String or Time or Date or DateTime | false | nil |
F | Integer | false | 0 |
AP | HexaPDF::Type::Annotation::AppearanceDictionary or Hash | false | nil |
AS | Symbol | false | nil |
Border | HexaPDF::PDFArray or Array | false | [0, 0, 1] |
C | HexaPDF::PDFArray or Array | false | nil |
StructParent | Integer | false | nil |
OC | HexaPDF::Dictionary or Hash | false | nil |
Public Instance Methods
Returns the annotation's appearance stream of the given type (:normal, :rollover, or :down) or nil
if it doesn't exist.
The appearance state in /AS or the one provided via state_name
is taken into account if necessary.
Returns the AppearanceDictionary
instance associated with the annotation or nil
if none is set.
Creates an empty appearance stream (a Form
XObject) of the given type (:normal, :rollover, or :down) and returns it. If an appearance stream already exist, it is overwritten.
If there can be multiple appearance streams for the annotation, use the state_name
argument to provide the appearance state name.
Returns true
because annotation objects must always be indirect objects.