Class: Pdfrb::Model::Type::UserProperty

Inherits:
Cos::Dictionary show all
Defined in:
lib/pdfrb/model/type/user_property.rb

Overview

UserProperty (ISO 32000-2 §14.7.5). A single property in the /P array of a user property list attached to structure elements for custom metadata.

Instance Attribute Summary

Attributes inherited from Object

#document, #gen, #oid, #value

Instance Method Summary collapse

Methods inherited from Cos::Dictionary

#[], #[]=, arlington_available?, arlington_default, arlington_key_to_symbol, arlington_loaded_for?, arlington_mark_loaded, arlington_object, arlington_one_type_to_ruby, arlington_required?, arlington_types_to_ruby, arlington_version, define_field, define_field_from_arlington, #delete, #each, each_field, #each_raw, #empty?, field, #initialize, #key?, #keys, lookup_type, own_fields, #pdf_type, register_type, type_map, #validate

Methods inherited from Object

#==, define_type, #deref, #indirect?, #initialize, #must_be_indirect?, #pdf_type, pdf_type

Constructor Details

This class inherits a constructor from Pdfrb::Model::Cos::Dictionary

Instance Method Details

#formatObject

/F — optional, a text string with the intended format of the value.



24
25
26
# File 'lib/pdfrb/model/type/user_property.rb', line 24

def format
  value[:F]
end

#hidden?Boolean

/H — optional, whether the property is hidden from the user (default false).

Returns:

  • (Boolean)


30
31
32
# File 'lib/pdfrb/model/type/user_property.rb', line 30

def hidden?
  value[:H] == true
end

#nameObject

/N — required, the property name.



13
14
15
# File 'lib/pdfrb/model/type/user_property.rb', line 13

def name
  value[:N]
end

#property_valueObject

/V — required, the property value (any COS type).



18
19
20
# File 'lib/pdfrb/model/type/user_property.rb', line 18

def property_value
  value[:V]
end