Class: EideticPDF::PdfObjects::PdfPage
- Inherits:
-
PdfPageBase
- Object
- IndirectObject
- PdfDictionaryObject
- PdfPageBase
- EideticPDF::PdfObjects::PdfPage
- Defined in:
- lib/epdfo.rb
Overview
one page of a PDF document, not counting resources defined in a parent
Instance Attribute Summary
Attributes inherited from IndirectObject
Instance Method Summary collapse
- #annots=(annots) ⇒ Object
- #beads=(beads) ⇒ Object
- #body ⇒ Object
-
#contents ⇒ Object
PdfStream’s.
-
#initialize(seq, gen, parent) ⇒ PdfPage
constructor
A new instance of PdfPage.
- #thumb=(thumb) ⇒ Object
Methods inherited from PdfPageBase
#additional_actions=, #crop_box=, #duration=, #hidden=, #media_box=, #resources=, #rotate=, #transition=
Methods inherited from PdfDictionaryObject
Methods inherited from IndirectObject
#footer, #header, #reference_object, #reference_string, #to_s
Constructor Details
Instance Method Details
#annots=(annots) ⇒ Object
786 787 788 789 790 |
# File 'lib/epdfo.rb', line 786 def annots=(annots) # annots: array of dictionary objects (@annots ||= []).concat(annots) dictionary['Annots'] = PdfArray.new(@annots.map { |annot| annot.reference_object }) end |
#beads=(beads) ⇒ Object
792 793 794 795 |
# File 'lib/epdfo.rb', line 792 def beads=(beads) # beads: array of dictionary objects dictionary['B'] = PdfArray.new(beads.map { |bead| bead.reference_object }) end |
#body ⇒ Object
767 768 769 770 771 772 773 774 |
# File 'lib/epdfo.rb', line 767 def body if contents.size > 1 dictionary['Contents'] = PdfArray.new(contents.map { |stream| stream.reference_object }) elsif contents.size == 1 dictionary['Contents'] = contents.first.reference_object end super end |
#contents ⇒ Object
PdfStream’s
777 778 779 |
# File 'lib/epdfo.rb', line 777 def contents @contents ||= [] end |
#thumb=(thumb) ⇒ Object
781 782 783 784 |
# File 'lib/epdfo.rb', line 781 def thumb=(thumb) # thumb: stream dictionary['Thumb'] = thumb.reference_object end |