Method: Origami::PDF#initialize
- Defined in:
- lib/origami/pdf.rb
#initialize(parser = nil) ⇒ PDF
Creates a new PDF instance.
- parser
-
The Parser object creating the document. If none is specified, some default structures are automatically created to get a minimal working document.
166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/origami/pdf.rb', line 166 def initialize(parser = nil) @header = PDF::Header.new @revisions = [] add_new_revision @revisions.first.trailer = Trailer.new if parser @loaded = false @parser = parser else init end end |