lib/prawn/document.rb in prawn-0.3.0 vs lib/prawn/document.rb in prawn-0.4.0

- old
+ new

@@ -7,30 +7,30 @@ # This is free software. Please see the LICENSE and COPYING files for details. require "stringio" require "prawn/document/page_geometry" require "prawn/document/bounding_box" -require "prawn/document/text" -require "prawn/document/table" require "prawn/document/internals" require "prawn/document/span" +require "prawn/document/text" require "prawn/document/annotations" require "prawn/document/destinations" module Prawn class Document - include Prawn::Document::Internals - include Prawn::Document::Annotations - include Prawn::Document::Destinations - include Prawn::Graphics + include Text + include PageGeometry + include Internals + include Annotations + include Destinations + include Prawn::Graphics include Prawn::Images - include Text - include PageGeometry - + attr_accessor :y, :margin_box attr_reader :margins, :page_size, :page_layout + attr_writer :font_size # Creates and renders a PDF document. # # When using the implicit block form, Prawn will evaluate the block # within an instance of Prawn::Document, simplifying your syntax. @@ -94,10 +94,11 @@ @page_size = options[:page_size] || "LETTER" @page_layout = options[:page_layout] || :portrait @compress = options[:compress] || false @skip_encoding = options[:skip_encoding] @background = options[:background] + @font_size = 12 text_options.update(options[:text_options] || {}) @margins = { :left => options[:left_margin] || 36, :right => options[:right_margin] || 36, @@ -284,10 +285,9 @@ @current_page = ref(:Type => :Page, :Parent => @pages, :MediaBox => page_dimensions, :Contents => @page_content) - font.add_to_current_page if @font update_colors end def generate_margin_box old_margin_box = @margin_box