how to create pdf.prawn file in visual studio 2008

15 views
Skip to first unread message

pavan chowdary

unread,
Sep 6, 2010, 2:48:54 AM9/6/10
to Prawn
hi
i am working on ruby on rails in visual studio 2008.i installed prawn
plug-in for my applicaton .i did't find .pdf.prawn tamplate in my
visual studio 2008

Brad Ediger

unread,
Sep 6, 2010, 10:34:17 AM9/6/10
to prawn...@googlegroups.com

Prawn is a Ruby library, not a plugin. Are you trying to use Prawnto?
That's the Rails plugin that gives you pdf.prawn templates, but it
hasn't been updated in a while.

Here's the solution that we use and recommend for PDF generation in Rails:

http://wiki.github.com/sandal/prawn/using-prawn-in-rails

Edmond Kachale

unread,
Sep 7, 2010, 3:01:03 AM9/7/10
to prawn-ruby

Prawn  "pure" Ruby gem. The .pdf.prawn template is for Prawnto. Prawnto is a Rails plugin, As Brad puts it, it hasn't been updated for sometime. It does not have any generator for creating .pdf.prawn templates. If you would like to use it, you need to create from scratch yourself. You can also save it as a template (read and follow Visual Studio instructions to do that). There are nice tutorials online.

In Ruby, we preach the usage of Prawn::Document. There was a similar discussion on that one. I will just paste the discussion below:

On 6 September 2010 02:01:17 UTC+2, Olivier Brisse <oura...@gmail.com> wrote:
Hi Josh,

On Sep 6, 4:43 am, Josh <josh.m.sha...@gmail.com> wrote:
> Who's version of prawnto are folks using these days?  thory-sun's
> hasn't been updated in a long time and still claims to only support
> rails 2.1 and 2.2.  Of all the forks is there any one in particular
> that's more up to date with more recent versions of rails?

I've used this version recently in a Rails 2.3.8 project without any
problems.

However, in another project I'm using prawn directly as explained
here : http://wiki.github.com/sandal/prawn/using-prawn-in-rails
I find it more flexible. My pdf documents are now subclasses of
Prawn::Document instead of views.
It's easier to share common code and you can either render the
document in the browser or write it somewhere to use it later (ie mail
it).
 
---
Edmond
Software Developer | Baobab Health Trust (http://www.baobabhealth.org/) | Malawi

Cell:  +265 999 465 137 | +265 881 234 717

"Many people doubt open source software and probably don’t realize that there is an alternative… which is just as good.." -- Kevin Scannell

Reply all
Reply to author
Forward
0 new messages