class HexaPDF::Type::Annotation

Parent
Extended With

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: PDF1.7 s12.5

Field Definitions

NameType/Allowed ValuesRequiredDefault Value
TypeSymbolfalse:Annot
SubtypeSymboltruenil
RectHexaPDF::Rectangle or Arraytruenil
ContentsStringfalsenil
PHexaPDF::Dictionary or Hashfalsenil
NMStringfalsenil
MHexaPDF::DictionaryFields::PDFDate or String or Time or Date or DateTimefalsenil
FIntegerfalse0
APHexaPDF::Type::Annotation::AppearanceDictionary or Hashfalsenil
ASSymbolfalsenil
BorderHexaPDF::PDFArray or Arrayfalse[0, 0, 1]
CHexaPDF::PDFArray or Arrayfalsenil
StructParentIntegerfalsenil
OCHexaPDF::Dictionary or Hashfalsenil

Public Instance Methods

appearance()

Returns the AppearanceDictionary instance associated with the annotation or nil if none is set.

appearance?()

Returns true if the widget's normal appearance exists.

Note that this checks only if the appearance exists but not if the structure of the appearance dictionary conforms to the expectations of the annotation.

must_be_indirect?()

Returns true because annotation objects must always be indirect objects.