Method: Origami::PDF.create

Defined in:
lib/origami/pdf.rb

.create(output, options = {}) {|pdf| ... } ⇒ Object Also known as: write

Creates a new PDF and saves it. If a block is passed, the PDF instance can be processed before saving.

Yields:

  • (pdf)


143
144
145
146
147
# File 'lib/origami/pdf.rb', line 143

def create(output, options = {})
    pdf = PDF.new
    yield(pdf) if block_given?
    pdf.save(output, options)
end