Chris,
> > Please help. What could I have done wrong? Thanks
I think you are having the same problem that I am currently having,
since my symptom is the same as yours, a non-readable PDF is created.
If you look in your log/development.log file, I bet you will see that
the error was:
ActionView::TemplateError (uninitialized constant RFPDF::View::TCPDF)
in app/views/pdf_letter/sample.rfpdf:
The RFPDF install instructions say nothing about installing TCPDF, so
I am as confused as you are. So I am headed back to Google.
Ed, are we missing something?
Thanks,
Peter
Discovering more:
I used this line to install the first time:
ruby script/plugin install http://rfpdf.googlecode.com/svn/trunk
I got that line from here:
http://dry.4thebusiness.com/info/rfpdf
But this page:
http://dry.4thebusiness.com/companies/list
Has the install link like this:
RFPDF plugin - https://rfpdf.googlecode.com/svn/trunk
So when I used the latter it installed a VERY different plugin. It
included many fonts, and TCPDF as well!
So I tried using the same sample code I got here:
http://dry.4thebusiness.com/info/rfpdf_source_code
Restarted mongrel, and this time got a new error:
ActionView::TemplateError (TCPDF error: Could not find font
freeserif.rb.) in app/views/pdf_letter/sample.rfpdf:
So apparently it is calling for some fonts that are missing...
Anyone have any ideas?
Peter
> ActionView::TemplateError (TCPDF error: Could not find font
> freeserif.rb.) in app/views/pdf_letter/sample.rfpdf:
I went here:
http://code.google.com/p/rfpdf/downloads/list
I downloaded the missing font. Unzipped it, and placed the files into
the vendor/plugins/rfpdf/lib/fonts directory.
Now I can create PDFs! Joy!
So the lesson here is that the demo code:
http://dry.4thebusiness.com/info/rfpdf_source_code
doesn't work with the version of RFPDF it says to install here:
http://dry.4thebusiness.com/info/rfpdf
You need to install it like this:
1. ruby script/plugin install https://rfpdf.googlecode.com/svn/trunk
2. change the directory's name from trunk to rfpdf.
3. install the missing fonts as I did above.
Hope this helps someone!
Peter