<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -15,7 +15,55 @@ Prawn::Document.generate(&quot;flow_with_headers_and_footers.pdf&quot;)  do
                                       
   bounding_box([bounds.left, bounds.top - 50], 
       :width  =&gt; bounds.width, :height =&gt; bounds.height - 100) do                 
-   text &quot;this is some flowing text &quot; * 200          
+   text &quot;this is some flowing text &quot; * 200    
+   
+   move_down(20)
+   
+   font &quot;#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf&quot;
+   table [[&quot;&#8021;&#945;&#955;&#959;&#957; &#981;&#945;&#947;&#949;&#8150;&#957;&quot;,    &quot;baaar&quot;,             &quot;1&quot; ],
+          [&quot;This is&quot;,&quot;a sample&quot;,          &quot;2&quot; ],
+          [&quot;Table&quot;,  &quot;dont\ncha\nknow?&quot;,  &quot;3&quot; ],
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules\nwith an iron fist&quot;, &quot;x&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],   
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],  
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ],     
+          [ &quot;It&quot;,    &quot;Rules&quot;,             &quot;4&quot; ]],     
+
+     :font_size  =&gt; 24, 
+     :horizontal_padding =&gt; 10,
+     :vertical_padding =&gt; 3,
+     :border     =&gt; 2,
+     :position   =&gt; :center,
+     :headers    =&gt; [&quot;Column A&quot;,&quot;Column B&quot;,&quot;#&quot;]
+          
  end    
  
 end       </diff>
      <filename>examples/flowing_text_with_header_and_footer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -130,12 +130,14 @@ module Prawn
       
       # Draws the table onto the PDF document
       #
-      def draw
+      def draw  
+        @parent_bounds = @document.bounds  
         case(@position) 
         when :center
           x = (@document.bounds.width - width) / 2.0
-          y = @document.y - @document.bounds.absolute_bottom
-          @document.bounding_box [x, y], :width =&gt; width do
+          dy = @document.bounds.absolute_top - @document.y
+          @document.bounding_box [x, @parent_bounds.top], :width =&gt; width do 
+            @document.move_down(dy)
             generate_table
           end
         when Numeric     
@@ -174,9 +176,9 @@ module Prawn
         end
       end
 
-      def generate_table
+      def generate_table    
         page_contents = []
-        y_pos = @document.y
+        y_pos = @document.y 
 
         @document.font.size(@font_size) do
           renderable_data.each_with_index do |row,index|
@@ -205,7 +207,7 @@ module Prawn
               end   
             end
 
-            if c.height &gt; y_pos - @document.margin_box.absolute_bottom
+            if c.height &gt; y_pos - @parent_bounds.absolute_bottom
               draw_page(page_contents)
               @document.start_new_page
               if @headers</diff>
      <filename>lib/prawn/document/table.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>examples/on_page_start.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>be7761934863bf6eda401d30e923728f4919d77f</id>
    </parent>
  </parents>
  <author>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </author>
  <url>http://github.com/sandal/prawn/commit/b2cb7ce906b6465c327008a7e7261d75ee76d247</url>
  <id>b2cb7ce906b6465c327008a7e7261d75ee76d247</id>
  <committed-date>2008-08-18T14:10:13-07:00</committed-date>
  <authored-date>2008-08-18T14:10:13-07:00</authored-date>
  <message>Remove useless example</message>
  <tree>e756cbf6703af1e4a2c6001b3c8d0510082a9120</tree>
  <committer>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </committer>
</commit>
