vendor/plugins/prawn/lib/prawn/document.rb
# Creates and advances to a new page in the document.
#
# Page size, margins, and layout can also be set when generating a
# new page. These values will become the new defaults for page creation
#
#   pdf.start_new_page #=> Starts new page keeping current values
#   pdf.start_new_page(:size => "LEGAL", :layout => :landscape)
#   pdf.start_new_page(:left_margin => 50, :right_margin => 50)
#
Creates and advances to a new page in the document.
Page size, margins, and layout can also be set when generating a
new page. These values will become the new defaults for page creation


Creates and advances to a new page in the document . Page size margins and layout can also be set when generating a new page . These values will become the new defaults for page creation
def start_new_page(options = {})
       @page_size   = options[:size] if options[:size]
       @page_layout = options[:layout] if options[:layout]
       [:left,:right,:top,:bottom].each do |side|
         if options[:"#{side}_margin"]
           @margins[side] = options[:"#{side}_margin"]
         end
       end
       finish_page_content if @page_content
       build_new_page_content
       @pages.data[:Kids] << @current_page
       @pages.data[:Count] += 1
       add_content "q"
       @y = @bounding_box.absolute_top
       image(@background, :at => [0,@y]) if @background
    end
def start_new_page ( options = { } ) @page_size = options [ :size ] if options [ :size ] @page_layout = options [ :layout ] if options [ :layout ] [ :left , :right , :top , :bottom ] . each do | side | if options [ :" #{ side } _margin " ] @margins [ side ] = options [ :" #{ side } _margin " ] end end finish_page_content if @page_content build_new_page_content @pages . data [ :Kids ] << @current_page @pages . data [ :Count ] += 1 add_content "q" @y = @bounding_box . absolute_top image ( @background , :at => [ 0 , @y ] ) if @background end
Creates and advances to a new page in the document.
Creates and advances to a new page in the document .
options
<not_specific>