244df895c3ed — Sean Russell 12 years ago
Fixes #291 ... again.
1 files changed, 6 insertions(+), 4 deletions(-)

M pdf.rb
M pdf.rb +6 -4
@@ 177,11 177,13 @@ module RML
 				(l+1).upto(6) { |k| @heading_numbers[k] = 0 }
 			end
 			n = ""
-			l.downto( 2 ) { |k| n = "#{@heading_numbers[k]}.#{n}" }
+			l.downto( 2 ) { |k| 
+				n = "#{@heading_numbers[k]}.#{n}" if @heading_numbers[k]
+			}
 			n.chop!
 			
 			align = attrs[:alignment]
-			size = 10 + ((7 - attrs[:level]) * 2)
+			size = 4 + ((7 - attrs[:level]) * 3)
 			style = attrs[:level] > 3 ? :italic : :normal
 			style_attrs = {:size=>size, :style=>style}
 			yield

          
@@ 198,7 200,7 @@ module RML
 			@first_heading = false
 			@pdf.move_down 5
 			align = attrs[:alignment]
-			size = 10 + ((7 - attrs[:level]) * 2)
+			size = 4 + ((7 - attrs[:level]) * 3)
 			style = attrs[:level] > 3 ? :italic : :normal
 			#@pdf.add_dest(attrs[:id], @pdf.dest_fit_horizontally(@pdf.cursor, @pdf.page.dictionary))
 			@pdf.font("Helvetica", {:size=>size, :style=>style}) {

          
@@ 211,7 213,7 @@ module RML
 		end
 		
 		def image(attrs)
-			@pdf.image(attrs[:image], :fit => [@pdf.bounds.width, @pdf.bounds.height])
+			@pdf.image(attrs[:image], :fit => [@pdf.bounds.width, @pdf.cursor])
 		end
 		
 		def quote(attrs)