Class: HexaPDF::Type::Catalog
- Inherits:
-
Dictionary
- Object
- Object
- Dictionary
- HexaPDF::Type::Catalog
- Defined in:
- lib/hexapdf/type/catalog.rb
Overview
Represents the PDF’s catalog dictionary which is at the root of the document’s object hierarchy.
The catalog dictionary is linked via the /Root entry from the Trailer.
See: PDF1.7 s7.7.2, Trailer
Constant Summary
Constants included from DictionaryFields
DictionaryFields::Boolean, DictionaryFields::PDFByteString, DictionaryFields::PDFDate
Constants inherited from Object
Object::NOT_DUPLICATABLE_CLASSES
Instance Attribute Summary
Attributes inherited from Object
#data, #document, #must_be_indirect
Instance Method Summary collapse
-
#must_be_indirect? ⇒ Boolean
Returns
true
since catalog objects must always be indirect. -
#pages ⇒ Object
Returns the root node of the page tree.
Methods inherited from Dictionary
#[], #[]=, define_field, define_type, #delete, #each, each_field, #empty?, field, #key?, #to_h, type, #type
Methods inherited from Object
#<=>, #==, #deep_copy, deep_copy, #document?, #eql?, #gen, #gen=, #hash, #indirect?, #initialize, #inspect, #null?, #oid, #oid=, #type, #validate, #value, #value=
Constructor Details
This class inherits a constructor from HexaPDF::Object
Instance Method Details
#must_be_indirect? ⇒ Boolean
Returns true
since catalog objects must always be indirect.
83 84 85 |
# File 'lib/hexapdf/type/catalog.rb', line 83 def must_be_indirect? true end |
#pages ⇒ Object
Returns the root node of the page tree.
See: PageTreeNode
90 91 92 |
# File 'lib/hexapdf/type/catalog.rb', line 90 def pages self[:Pages] ||= document.add(Type: :Pages) end |