Skip to content

Instantly share code, notes, and snippets.

@markbates
Created August 16, 2008 19:39
Show Gist options
  • Save markbates/5749 to your computer and use it in GitHub Desktop.
Save markbates/5749 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 "nn"
p.text @post.body
p.text "nn"
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