Sha256: c7faa618f2b57ef19b8a4f5017eb762e41f2c936cae9e4a06f852dac72506932

Contents?: true

Size: 1.43 KB

Versions: 5

Compression:

Stored size: 1.43 KB

Contents

# encoding: utf-8
#
# Examples for tables.
#
require File.expand_path(File.join(File.dirname(__FILE__),
                                   %w[.. example_helper]))

Prawn::ManualBuilder::Example.generate("table.pdf", :page_size => "FOLIO") do

  package "table" do |p|

    p.section "Basics" do |s|
      s.example "creation"
      s.example "content_and_subtables"
      s.example "flow_and_header"
      s.example "position"
    end

    p.section "Styling" do |s|
      s.example "column_widths"
      s.example "width"
      s.example "row_colors"
      s.example "cell_dimensions"
      s.example "cell_borders_and_bg"
      s.example "cell_border_lines"
      s.example "cell_text"
      s.example "image_cells"
      s.example "span"
      s.example "before_rendering_page"
    end

    p.section "Initializer Block" do |s|
      s.example "basic_block"
      s.example "filtering"
      s.example "style"
    end

    p.intro do
      prose("Prawn comes with table support out of the box. Tables can be styled in whatever way you see fit. The whole table, rows, columns and cells can be styled independently from each other.

      The examples show:")

      list( "How to create tables",
            "What content can be placed on tables",
            "Subtables (or tables within tables)",
            "How to style the whole table",
            "How to use initializer blocks to style only specific portions of the table"
          )
    end

  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
prawn-table-0.0.4 manual/table/table.rb
prawn-table-0.0.3 manual/table/table.rb
prawn-table-0.0.2 manual/table/table.rb
prawn-table-0.0.1 manual/table/table.rb
prawn-1.1.0 manual/table/table.rb