# Creation of pdf using rpdf

**URL:** <https://www.ruby-forum.com/t/creation-of-pdf-using-rpdf/164926>\
**Category:** Rails\
**Created:** [April 7, 2009, 2:44pm UTC](https://www.ruby-forum.com/t/creation-of-pdf-using-rpdf/164926 "2009-04-07T14:44:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [April 7, 2009, 2:44pm UTC](https://www.ruby-forum.com/t/creation-of-pdf-using-rpdf/164926/1 "2009-04-07T14:44:41Z")

</div>

Hi,  
I want to generate a pdf by using rpdf plugin.  
Can anyone tell me how to do that?  
What are the gems or plugins will be required for that?  
Is there any tutorial available for this?  
Is it possible to create table structure into it?  
If anyone knows any URL then that will be great.  
Thanks,  
Tushar

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [April 7, 2009, 2:52pm UTC](https://www.ruby-forum.com/t/creation-of-pdf-using-rpdf/164926/2 "2009-04-07T14:52:18Z")

</div>

Tushar G. wrote:

> I want to generate a pdf by using rpdf plugin.  
> Can anyone tell me how to do that?

Google is your friend here… 🙂

> What are the gems or plugins will be required for that?  
> Is there any tutorial available for this?  
> Is it possible to create table structure into it?  
> If anyone knows any URL then that will be great.

You need [http://ruby-pdf.rubyforge.org/pdf-writer/](http://ruby-pdf.rubyforge.org/pdf-writer/) as rpdf is dependent  
on this gem. The documentation here describes very thoroughly how to  
make PDF’s

The only other thing you need is an example of using Rpdf on top of this

- e.g. in a view:

[http://railspdfplugin.rubyforge.org/wiki/wiki.pl](http://railspdfplugin.rubyforge.org/wiki/wiki.pl)

- Carsten

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [April 7, 2009, 3:11pm UTC](https://www.ruby-forum.com/t/creation-of-pdf-using-rpdf/164926/3 "2009-04-07T15:11:04Z")

</div>

Carsten G. wrote:

> Tushar G. wrote:
> 
> > I want to generate a pdf by using rpdf plugin.  
> > Can anyone tell me how to do that?
> 
> Google is your friend here… 🙂
> 
> > What are the gems or plugins will be required for that?  
> > Is there any tutorial available for this?  
> > Is it possible to create table structure into it?  
> > If anyone knows any URL then that will be great.
> 
> You need [http://ruby-pdf.rubyforge.org/pdf-writer/](http://ruby-pdf.rubyforge.org/pdf-writer/) as rpdf is dependent  
> on this gem. The documentation here describes very thoroughly how to  
> make PDF’s
> 
> The only other thing you need is an example of using Rpdf on top of this
> 
> - e.g. in a view:
> 
> [http://railspdfplugin.rubyforge.org/wiki/wiki.pl](http://railspdfplugin.rubyforge.org/wiki/wiki.pl)
> 
> - Carsten  
> Thanks Carsten  
> I have one more question  
> Is it possible to create table structure into it?  
> If yes how to do that?  
> Is there any documentation available for the rpdf?  
> Thanks,  
> Tushar

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [April 7, 2009, 3:18pm UTC](https://www.ruby-forum.com/t/creation-of-pdf-using-rpdf/164926/4 "2009-04-07T15:18:50Z")

</div>

Tushar G. wrote:

> I have one more question  
> Is it possible to create table structure into it?  
> If yes how to do that?  
> Is there any documentation available for the rpdf?

You will find all you need here:

[http://ruby-pdf.rubyforge.org/pdf-writer/](http://ruby-pdf.rubyforge.org/pdf-writer/)

- Carsten

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [April 7, 2009, 3:34pm UTC](https://www.ruby-forum.com/t/creation-of-pdf-using-rpdf/164926/5 "2009-04-07T15:34:24Z")

</div>

Carsten G. wrote:

> Tushar G. wrote:
> 
> > I have one more question  
> > Is it possible to create table structure into it?  
> > If yes how to do that?  
> > Is there any documentation available for the rpdf?
> 
> You will find all you need here:
> 
> [http://ruby-pdf.rubyforge.org/pdf-writer/](http://ruby-pdf.rubyforge.org/pdf-writer/)
> 
> - Carsten

I installed that plugin but I getting an error whenever I am trying to  
start server.  
“in `evaluate_init_rb': undefined method `register\_template\_handler’ for  
ActionView::Base:Class (NoMethodError)”. How to tackle this problem?  
Thanks,  
Tushar

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [April 7, 2009, 3:58pm UTC](https://www.ruby-forum.com/t/creation-of-pdf-using-rpdf/164926/6 "2009-04-07T15:58:18Z")

</div>

Tushar G. wrote:

> Carsten G. wrote:
> 
> > Tushar G. wrote:
> > 
> > > I have one more question  
> > > Is it possible to create table structure into it?  
> > > If yes how to do that?  
> > > Is there any documentation available for the rpdf?
> > 
> > You will find all you need here:
> > 
> > [http://ruby-pdf.rubyforge.org/pdf-writer/](http://ruby-pdf.rubyforge.org/pdf-writer/)
> > 
> > - Carsten
> 
> I installed that plugin but I getting an error whenever I am trying to  
> start server.  
> “in `evaluate_init_rb': undefined method `register\_template\_handler’ for  
> ActionView::Base:Class (NoMethodError)”. How to tackle this problem?  
> Thanks,  
> Tushar  
> Also, I am not able to understand this line. “To use the plugin, Grab  
> the latest file and install it into the plugin directory of your Rails  
> application. If you are using Rails 2.0, you might have to install the  
> patch on the homepage.”  
> What is that mean?  
> I am using rails 2.2. If I want to do that What should I do?  
> Thanks,  
> Tushar
