# HG changeset patch # User Sean Russell # Date 1313888367 14400 # Sat Aug 20 20:59:27 2011 -0400 # Node ID 5100e0c48650956e98e0d355e695daa3ea9184bc # Parent f71bfaaff5fdafb698678f10653b35f04f12cea9 More work on the pdfslides layout (references #271) diff --git a/markup-slides.txt b/markup-slides.txt --- a/markup-slides.txt +++ b/markup-slides.txt @@ -107,7 +107,7 @@ Indented paragraph More indentation - + Quotes ################################## diff --git a/pdfslides.rb b/pdfslides.rb --- a/pdfslides.rb +++ b/pdfslides.rb @@ -16,7 +16,7 @@ end def start_doc - @pdf = Prawn::Document.new(:margin => [@header_size + 0.25.in, 0.25.in, 0.25.in, 0.25.in], + @pdf = Prawn::Document.new(:margin => [@header_size + 0.5.in, 0.25.in, 0.25.in, 0.25.in], :page_layout => :landscape, :page_size => @page_format, :compress => false, @@ -24,19 +24,22 @@ ) @pdf.font("Helvetica") @pdf.font_size(20) - @pdf.repeat( :even, :dynamic => true) { + @pdf.repeat( :all, :dynamic => true) { unless @pdf.page_number == 1 @pdf.canvas { @pdf.transparent(0.5) { - old_fill, old_stroke = @pdf.fill_color, @pdf.stroke_color @pdf.fill_color = "9999ff" @pdf.stroke_color = "9999dd" @pdf.fill_and_stroke_rectangle(@pdf.bounds.absolute_top_left, @pdf.bounds.absolute_right, @header_size) } title = @slide_titles.shift @pdf.image(@head_icon_image) if @head_icon_image - @pdf.text(title, :size => 24, - :color => "000000") + @pdf.draw_text(title, + :at => [@pdf.bounds.absolute_left+1.in, @pdf.bounds.absolute_top-0.5.in], + :size => 28, + :color => "000000") + #@pdf.text(title, :size => 24, + # :color => "000000") } end }