search for: generate_pdf

Displaying 3 results from an estimated 3 matches for "generate_pdf".

Did you mean: generate_fdf
2008 Oct 26
2
use Prawn to generate pdf
Hello: when i use Prawn to generate pdf file for download, i got a blank pdf file, can someone tell me why? require ''prawn'' class DownloadController < ApplicationController def download_pdf send_data(generate_pdf, :filename => ''test.pdf'', :type => ''application/pdf'') end private def generate_pdf Prawn::Document.new do |p| p.text ''Document Name'', :align => ''center'' p.text ''Address: address''...
2008 Mar 13
0
Template being ignored when attaching pdf in e-mail
...= "test-J0of1frlU80@public.gmane.org" @sent_on = Time.now @content_type = "text/html" attachment :content_type => "application/pdf", :filename => "notice.pdf", :transfer_encoding => "send_pdf" do |a| a.body = generate_pdf(notice_request) end end def generate_pdf(notice_request) pdf = PDF::Writer.new(:paper => "LETTER") pdf.select_font ''Times-Roman'' pdf.text "HELLO WORLD", :font_size => 17, :justification => :center pdf.move_pointer...
2012 Mar 22
1
Rspec not loading fixtures
...39;'/../spec_helper'') describe DownloadsController do integrate_views describe "when PDF is ready" do before(:each) do @registrant = Factory.create(:step_5_registrant) stub(@registrant).merge_pdf { `touch #{@registrant.pdf_file_path}` } @registrant.generate_pdf @registrant.save! end it "provides a link to download the PDF" do get :show, :registrant_id => @registrant.to_param assert_not_nil assigns[:registrant] assert_response :success assert_template "show" assert_select "span.button...