public
Description: Fast, Nimble PDF Writer for Ruby
Homepage: http://prawn.majesticseacreature.com
Clone URL: git://github.com/sandal/prawn.git
Investigating :align_headers issue [#119]

It appears as if when :border_style => :grid, header alignment is ignored.
With a default border style, the problem cannot be reproduced.  I have updated
the example slightly and will investigate further
sandal (author)
Fri Nov 14 06:27:26 -0800 2008
commit  786146a2583d3e51f7b6dc804b94e93b9bbef2d0
tree    0afdbbf3c5abacd4227c6bf317af7591cfb76f44
parent  68bba64232ebd93eb236843c5a79f911c0303dcb
...
2
3
4
 
 
 
 
 
 
5
6
7
8
9
10
11
 
 
 
 
 
 
 
12
...
2
3
4
5
6
7
8
9
10
11
12
13
14
 
 
 
15
16
17
18
19
20
21
22
0
@@ -2,11 +2,21 @@
0
 # Prawn ignores :align_headers property in tables
0
 # when :border_style => :grid is present (Lighthouse issue #119).
0
 #
0
+# NOTES: 
0
+# 
0
+#  * This issue can only be reproduced when :border_style => :grid is used
0
+#
0
+$DEBUG = true
0
+
0
 $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
0
 require "prawn"
0
 
0
 Prawn::Document.generate("table_ignores_align_headers.pdf") do
0
-  left = "Left\njustified"
0
-  center = "Should\nbe\ncentered"
0
-  table [[left, left], [left, left]], :headers => [center, center], :align => :left, :align_headers => :center, :border_style => :grid
0
+  left  = "Left justified"
0
+  left2 = "left"
0
+  center = "centered"
0
+  table [[left, left], [left2, left2]], :headers       => [center, center], 
0
+                                      :align         => :left, 
0
+                                      :align_headers => :center,
0
+                                      :border_style  => :grid
0
 end

Comments