Sha256: 1cfdcdbcf50a619697aae5d1b56366d93053df9f4bcec573ebbf19cd6e26d2b9

Contents?: true

Size: 901 Bytes

Versions: 3

Compression:

Stored size: 901 Bytes

Contents

# encoding: utf-8
#
# The <code>table()</code> method accepts a <code>:position</code> argument to
# determine horizontal position of the table within its bounding box. It can be
# <code>:left</code> (the default), <code>:center</code>, <code>:right</code>,
# or a number specifying a distance in PDF points from the left side.
#
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 = [["The quick brown fox jumped over the lazy dogs."]] * 2

  text "Left:"
  table data, :position => :left
  move_down 10

  text "Center:"
  table data, :position => :center
  move_down 10

  text "Right:"
  table data, :position => :right
  move_down 10

  text "100pt:"
  table data, :position => 100
end

Version data entries

3 entries across 3 versions & 1 rubygems

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