Skip to content

Instantly share code, notes, and snippets.

@prodigerati
Forked from zhhz/price_letters.html.erb
Created February 27, 2013 15:08
Show Gist options
  • Save prodigerati/5048593 to your computer and use it in GitHub Desktop.
Save prodigerati/5048593 to your computer and use it in GitHub Desktop.
# price_letter.pdf.erb
<%=
require "prawn/measurement_extensions"
require "prawn/table"
pdf = Prawn::Document.new(
:page_size => "A4",
:left_margin => 2.cm,
:right_margin => 2.cm,
:top_margin => 2.cm,
:bottom_margin => 1.5.cm
)
# logo
logo = image_dir + 'logo.jpg'
pdf.image logo, :position => :center
pdf.font "Times-Roman"
...
pdf.render
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment