Class: Origami::PDF::Revision
- Inherits:
-
Object
- Object
- Origami::PDF::Revision
- Defined in:
- lib/origami/pdf.rb
Overview
Class representing a particular revision in a PDF file. Revision contains :
-
A Body, which is a sequence of Object.
-
A XRef::Section, holding XRef information about objects in body.
-
A Trailer.
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#pdf ⇒ Object
Returns the value of attribute pdf.
-
#trailer ⇒ Object
Returns the value of attribute trailer.
-
#xrefstm ⇒ Object
Returns the value of attribute xrefstm.
-
#xreftable ⇒ Object
Returns the value of attribute xreftable.
Instance Method Summary collapse
- #has_xrefstm? ⇒ Boolean
- #has_xreftable? ⇒ Boolean
-
#initialize(pdf) ⇒ Revision
constructor
A new instance of Revision.
- #objects ⇒ Object
Constructor Details
#initialize(pdf) ⇒ Revision
Returns a new instance of Revision.
153 154 155 156 157 158 159 |
# File 'lib/origami/pdf.rb', line 153 def initialize(pdf) @pdf = pdf @body = {} @xreftable = nil @xrefstm = nil @trailer = nil end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
151 152 153 |
# File 'lib/origami/pdf.rb', line 151 def body @body end |
#pdf ⇒ Object
Returns the value of attribute pdf.
150 151 152 |
# File 'lib/origami/pdf.rb', line 150 def pdf @pdf end |
#trailer ⇒ Object
Returns the value of attribute trailer.
151 152 153 |
# File 'lib/origami/pdf.rb', line 151 def trailer @trailer end |
#xrefstm ⇒ Object
Returns the value of attribute xrefstm.
151 152 153 |
# File 'lib/origami/pdf.rb', line 151 def xrefstm @xrefstm end |
#xreftable ⇒ Object
Returns the value of attribute xreftable.
151 152 153 |
# File 'lib/origami/pdf.rb', line 151 def xreftable @xreftable end |
Instance Method Details
#has_xrefstm? ⇒ Boolean
170 171 172 |
# File 'lib/origami/pdf.rb', line 170 def has_xrefstm? not @xrefstm.nil? end |
#has_xreftable? ⇒ Boolean
166 167 168 |
# File 'lib/origami/pdf.rb', line 166 def has_xreftable? not @xreftable.nil? end |
#objects ⇒ Object
174 175 176 |
# File 'lib/origami/pdf.rb', line 174 def objects @body.values end |