hey i found this #in controller require ''pdf/writer'' def pdf gen_pdf redirect_to("#{@request.relative_url_root}/pdf/hello.pdf") end private def gen_pdf pdf = PDF::Writer.new pdf.select_font "Times-Roman" pdf.text "Hello, Ruby.", :font_size => 72, :justification => :center pdf.save_as("public/pdf/hello.pdf") end but does somebody has some code for creating tables ---------------------- i can create tables with fpdf (php), just need to translate the code, but the only problem with fpdf is that i cant display photos. Any solution for this? thanks
On 10/7/05, Nick Brutyn <brutyn_nick-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> > hey i found this > > #in controller > require ''pdf/writer'' > > def pdf > gen_pdf > redirect_to("#{@request.relative_url_root}/pdf/hello.pdf") > end > > private > def gen_pdf > pdf = PDF::Writer.new > pdf.select_font "Times-Roman" > pdf.text "Hello, Ruby.", :font_size => 72, :justification => :center > > pdf.save_as("public/pdf/hello.pdf") > end > > > but does somebody has some code for creating tables >There is a fairly good manual that comes with pdf writer, and there are also a number of examples that are on the website and in the source. Chris _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails