class HexaPDF::Type::Catalog

Parent

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: PDF2.0 s7.7.2, Trailer

Field Definitions

NameType/Allowed ValuesRequiredDefault Value
TypeSymboltrue:Catalog
VersionSymbolfalsenil
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
PageLayoutSymbol
One of: :SinglePage, :OneColumn, :TwoColumnLeft, :TwoColumnRight, :TwoPageLeft, :TwoPageRight
false:SinglePage
PageModeSymbol
One of: :UseNone, :UseOutlines, :UseThumbs, :FullScreen, :UseOC, :UseAttachments
false:UseNone
OutlinesHexaPDF::Type::Outline 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::Type::Metadata or Hashfalsenil
StructTreeRootHexaPDF::Dictionary or Hashfalsenil
MarkInfoHexaPDF::Type::MarkInformation or Hashfalsenil
LangStringfalsenil
SpiderInfoHexaPDF::Dictionary or Hashfalsenil
OutputIntentsHexaPDF::PDFArray or Arrayfalsenil
PieceInfoHexaPDF::Dictionary or Hashfalsenil
OCPropertiesHexaPDF::Type::OptionalContentProperties 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

must_be_indirect?()

Returns true since catalog objects must always be indirect.

names()

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

See: Names

optional_content()

Returns the optional content properties dictionary, creating it if needed.

This is the main entry point for working with optional content, a.k.a. layers.

See: OptionalContentProperties

outline()

Returns the document outline, creating it if needed.

See: Outline

page_labels(create: false)

Returns the page labels number tree.

  • If a page labels number tree exists, the create argument is not used.

  • If no page labels number tree exists and create is true, a new one is created.

  • If no page labels number tree exists and create is false, nil is returned.

See: HexaPDF::Document::Pages

pages()

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

See: PageTreeNode