Sha256: f3f107cccf1802d3305acfc619057d5a9beb26654e8273fcbeb5246d7850f54f

Contents?: true

Size: 661 Bytes

Versions: 3

Compression:

Stored size: 661 Bytes

Contents

# encoding: utf-8
#
# One of the most common table styling techniques is to stripe the rows with
# alternating colors.
#
# There is one helper just for that. Just provide the <code>:row_colors</code>
# option an array with color values.
#
require File.expand_path(File.join(File.dirname(__FILE__),
                                   %w[.. example_helper]))

filename = File.basename(__FILE__).gsub('.rb', '.pdf')
Prawn::ManualBuilder::Example.generate(filename) do
  data = [["This row should have one color"],
          ["And this row should have another"]]

  data += [["..."]] * 10

  table(data, :row_colors => ["F0F0F0", "FFFFCC"])
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
prawn-table-continued-1.0.0.rc3 manual/table/row_colors.rb
prawn-table-continued-1.0.0.rc2 manual/table/row_colors.rb
prawn-table-continued-1.0.0.rc1 manual/table/row_colors.rb