Class: EideticPDF::PdfObjects::PdfCatalog
- Inherits:
-
PdfDictionaryObject
- Object
- IndirectObject
- PdfDictionaryObject
- EideticPDF::PdfObjects::PdfCatalog
- Defined in:
- lib/epdfo.rb
Overview
root object of a PDF document, with pointers to other top-level objects
Constant Summary collapse
- PAGE_MODES =
{ :use_none => 'UseNone', :use_outlines => 'UseOutlines', :use_thumbs => 'UseThumbs', :full_screen => 'FullScreen' }.freeze
Instance Attribute Summary collapse
-
#outlines ⇒ Object
readonly
Returns the value of attribute outlines.
-
#page_mode ⇒ Object
readonly
Returns the value of attribute page_mode.
-
#pages ⇒ Object
readonly
Returns the value of attribute pages.
Attributes inherited from IndirectObject
Instance Method Summary collapse
-
#initialize(seq, gen, page_mode = :use_none, pages = nil, outlines = nil) ⇒ PdfCatalog
constructor
A new instance of PdfCatalog.
- #to_s ⇒ Object
Methods inherited from PdfDictionaryObject
Methods inherited from IndirectObject
#body, #footer, #header, #reference_object, #reference_string
Constructor Details
#initialize(seq, gen, page_mode = :use_none, pages = nil, outlines = nil) ⇒ PdfCatalog
Returns a new instance of PdfCatalog.
831 832 833 834 835 836 837 838 839 840 841 842 843 844 |
# File 'lib/epdfo.rb', line 831 def initialize(seq, gen, page_mode=:use_none, pages=nil, outlines=nil) super(seq, gen) dictionary['Type'] = PdfName.new('Catalog') @page_mode = page_mode dictionary['PageMode'] = PdfName.new(PAGE_MODES[page_mode]) if pages @pages = pages dictionary['Pages'] = pages.reference_object end if outlines @outlines = outlines dictionary['Outlines'] = outlines.reference_object end end |
Instance Attribute Details
#outlines ⇒ Object (readonly)
Returns the value of attribute outlines.
829 830 831 |
# File 'lib/epdfo.rb', line 829 def outlines @outlines end |
#page_mode ⇒ Object (readonly)
Returns the value of attribute page_mode.
829 830 831 |
# File 'lib/epdfo.rb', line 829 def page_mode @page_mode end |
#pages ⇒ Object (readonly)
Returns the value of attribute pages.
829 830 831 |
# File 'lib/epdfo.rb', line 829 def pages @pages end |
Instance Method Details
#to_s ⇒ Object
846 847 848 |
# File 'lib/epdfo.rb', line 846 def to_s super end |