Class: Pdfrb::Model::Type::StructureAttributes

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

Overview

Structure Attributes Dictionary (s14.7.5). Per-structure-element attributes — owner + per-owner attribute fields (Layout, Table, List, PrintField, etc.).

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

#artifact_owner?Boolean

Returns:

  • (Boolean)


34
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 34

def artifact_owner?; owner == :Artifact; end

#background_colorObject



14
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 14

def background_color; self[:BackgroundColor]; end

#border_colorObject



15
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 15

def border_color; self[:BorderColor]; end

#border_styleObject



16
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 16

def border_style; self[:BorderStyle]; end

#border_thicknessObject



17
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 17

def border_thickness; self[:BorderThickness]; end

#colorObject



19
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 19

def color; self[:Color]; end

#end_indentObject



26
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 26

def end_indent; self[:EndIndent]; end

#has_namespace?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 38

def has_namespace?
  !!namespace
end

#heightObject



22
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 22

def height; self[:Height]; end

#layout_owner?Boolean

Returns:

  • (Boolean)


30
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 30

def layout_owner?; owner == :Layout; end

#line_heightObject



28
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 28

def line_height; self[:LineHeight]; end

#list_owner?Boolean

Returns:

  • (Boolean)


31
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 31

def list_owner?; owner == :List; end

#namespaceObject



11
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 11

def namespace; self[:NS]; end

#ownerObject



10
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 10

def owner; self[:O]; end

#paddingObject



18
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 18

def padding; self[:Padding]; end

#placementObject



12
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 12

def placement; self[:Placement]&.to_sym; end

Returns:

  • (Boolean)


33
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 33

def print_field_owner?; owner == :PrintField; end

#space_afterObject



24
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 24

def space_after; self[:SpaceAfter]; end

#space_beforeObject



23
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 23

def space_before; self[:SpaceBefore]; end

#start_indentObject



25
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 25

def start_indent; self[:StartIndent]; end

#table_owner?Boolean

Returns:

  • (Boolean)


32
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 32

def table_owner?; owner == :Table; end

#text_alignObject



20
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 20

def text_align; self[:TextAlign]&.to_sym; end

#text_indentObject



27
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 27

def text_indent; self[:TextIndent]; end

#user_properties_owner?Boolean

Returns:

  • (Boolean)


36
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 36

def user_properties_owner?; owner == :UserProperties; end

#widthObject



21
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 21

def width; self[:Width]; end

#writing_modeObject



13
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 13

def writing_mode; (self[:WritingMode] || :LrTb).to_sym; end

#xml_owner?Boolean

Returns:

  • (Boolean)


35
# File 'lib/pdfrb/model/type/structure_attributes.rb', line 35

def xml_owner?; owner.to_s.start_with?("XML", "HTML"); end