Skip to content

Commit

Permalink
Merge branch 'master' of github.com:danmelton/vip_multilingual_posters
Browse files Browse the repository at this point in the history
  • Loading branch information
danmelton committed Apr 30, 2012
2 parents ef6d249 + f3aa859 commit a961efa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
size = params[:size] size = params[:size]
translations = YAML.load(open('files/translations.yml')) translations = YAML.load(open('files/translations.yml'))


pdf = Prawn::Document.generate "poster_#{language}_#{size}.pdf", :template => "public/pdfs/#{size}.pdf" do |pdf| pdf = Prawn::Document.new :template => "public/pdfs/#{size}.pdf" do |pdf|
pdf.fill_color "FFFFFF" pdf.fill_color "FFFFFF"
pdf.text translations[language]["vote"], size: 120, style: :bold, :align => :center pdf.text translations[language]["vote"], size: 120, style: :bold, :align => :center
pdf.fill_color "000000" pdf.fill_color "000000"
Expand All @@ -60,7 +60,9 @@
end end


response.headers['Content-Type'] = "application/pdf" response.headers['Content-Type'] = "application/pdf"
send_file "poster_#{language}_large.pdf" response.headers['Content-Disposition'] = "inline; filename=poster_#{language}_large.pdf;"
response.write pdf.render

end end


def vip_object(geocoder_object) def vip_object(geocoder_object)
Expand Down

0 comments on commit a961efa

Please sign in to comment.