Sha256: 93c99906b75ebdced6d512042092849259d50a4a8cbe8e356e1d6618b4cfd516

Contents?: true

Size: 923 Bytes

Versions: 3

Compression:

Stored size: 923 Bytes

Contents

# encoding: utf-8
#
#<b>NOTE: Templates are currently unmaintained and may be removed by Prawn 1.0!</b>
#
# You may load another PDF while creating a new one. Just pass the loaded PDF
# filename to the <code>:template</code> option when creating/generating the new
# PDF.
#
# The provided PDF will be loaded and its first page will be set as the
# current page. If you'd like to resume the document you may take advantage of
# two helpers: <code>page_count</code> and <code>go_to_page</code>.
#
require File.expand_path(File.join(File.dirname(__FILE__),
                                   %w[.. example_helper]))

filename = "#{Prawn::DATADIR}/pdfs/multipage_template.pdf"

Prawn::Example.generate("full_template.pdf", :template => filename) do
  go_to_page(page_count)

  start_new_page

  text "Previous pages and content imported.", :align => :center
  text "This page and content is brand new.",  :align => :center
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
prawn-0.13.2 manual/templates/full_template.rb
prawn-0.13.1 manual/templates/full_template.rb
prawn-0.13.0 manual/templates/full_template.rb