Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:danmelton/vip_multilingual_posters

  • Loading branch information...
commit a961efa074941d486d33eba1e686dfad89475602 2 parents ef6d249 + f3aa859
@danmelton authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 main.rb
View
6 main.rb
@@ -43,7 +43,7 @@
size = params[:size]
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.text translations[language]["vote"], size: 120, style: :bold, :align => :center
pdf.fill_color "000000"
@@ -60,7 +60,9 @@
end
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
def vip_object(geocoder_object)
Please sign in to comment.
Something went wrong with that request. Please try again.