class HexaPDF::Type::Catalog


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

Field Definitions

NameType/Allowed ValuesRequiredDefault Value
ExtensionsHexaPDF::Dictionary or Hashfalsenil
PagesHexaPDF::Type::PageTreeNode or Hashfalsenil
PageLabelsHexaPDF::NumberTreeNode or Hashfalsenil
NamesHexaPDF::Type::Names or Hashfalsenil
DestsHexaPDF::Dictionary or Hashfalsenil
ViewerPreferencesHexaPDF::Type::ViewerPreferences or Hashfalsenil
One of: :SinglePage, :OneColumn, :TwoColumnLeft, :TwoColumnRight, :TwoPageLeft, :TwoPageRight
One of: :UseNone, :UseOutlines, :UseThumbs, :FullScreen, :UseOC, :UseAttachments
OutlinesHexaPDF::Dictionary or Hashfalsenil
ThreadsHexaPDF::PDFArray or Arrayfalsenil
OpenActionHexaPDF::Dictionary or HexaPDF::PDFArray or Hash or Arrayfalsenil
AAHexaPDF::Dictionary or Hashfalsenil
URIHexaPDF::Dictionary or Hashfalsenil
AcroFormHexaPDF::Type::AcroForm::Form or Hashfalsenil
MetadataHexaPDF::Stream or Hashfalsenil
StructTreeRootHexaPDF::Dictionary or Hashfalsenil
MarkInfoHexaPDF::Dictionary or Hashfalsenil
SpiderInfoHexaPDF::Dictionary or Hashfalsenil
OutputIntentsHexaPDF::PDFArray or Arrayfalsenil
PieceInfoHexaPDF::Dictionary or Hashfalsenil
OCPropertiesHexaPDF::Dictionary or Hashfalsenil
PermsHexaPDF::Dictionary or Hashfalsenil
LegalHexaPDF::Dictionary or Hashfalsenil
RequirementsHexaPDF::PDFArray or Arrayfalsenil
CollectionHexaPDF::Dictionary or Hashfalsenil
NeedsRenderingTrueClass or FalseClassfalsenil

Public Instance Methods

acro_form(create: false)

Returns the main AcroForm object.

  • If an AcroForm object exists, the create argument is not used.

  • If no AcroForm object exists and create is true, a new AcroForm object with default settings will be created and returned.

  • If no AcroForm object exists and create is false, nil is returned.

See: AcroForm::Form


Returns true since catalog objects must always be indirect.


Returns the name dictionary containing all name trees of the document, creating it if needed.

See: Names


Returns the root node of the page tree, creating it if needed.

See: PageTreeNode