Skip to content

Instantly share code, notes, and snippets.

@markbates
Created August 25, 2008 02:39
Show Gist options
  • Select an option

  • Save markbates/7025 to your computer and use it in GitHub Desktop.

Select an option

Save markbates/7025 to your computer and use it in GitHub Desktop.
pdf.select_font "Times-Roman"
pdf.fill_color(Color::RGB::Red)
pdf.text @post.title, :font_size => 24, :justification => :center
pdf.fill_color(Color::RGB::Black)
pdf.text "by #{@post.email}", :font_size => 12, :justification => :center
pdf.with_options(:font_size => 10, :justification => :left) do |p|
p.text "\n"
p.text @post.body
p.text "\n"
p.text "Created at: #{@post.created_at}"
p.text "Updated at: #{@post.updated_at}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment