{"id":131,"date":"2006-07-05T08:21:52","date_gmt":"2006-07-05T13:21:52","guid":{"rendered":"http:\/\/www.juixe.com\/techknow\/index.php\/2006\/07\/05\/rails-pdf-plugin\/"},"modified":"2006-07-05T08:21:52","modified_gmt":"2006-07-05T13:21:52","slug":"rails-pdf-plugin","status":"publish","type":"post","link":"http:\/\/juixe.com\/techknow\/index.php\/2006\/07\/05\/rails-pdf-plugin\/","title":{"rendered":"Rails PDF Plugin"},"content":{"rendered":"<p>This is one the the most simple and useful plugins you can use.  To get started you will need to install the <b>PDF::Writer<\/b> gem.<\/p>\n<pre>\ngem install pdf-writer\n<\/pre>\n<p>Install the <b>Rails PDF Plugin<\/b>.<\/p>\n<pre>\nscript\/plugin install svn:\/\/rubyforge.org\/\/var\/svn\/railspdfplugin\/railspdf\n<\/pre>\n<p>To create a PDF document for an action, you need to change the action&#8217;s view extension from rhtml to rpdf.  In the rpdf view you can insert PDF::Writer code.  For example, to create a Hello, World PDF use just these two lines of code in the rpdf view:<\/p>\n<pre>\npdf.select_font \"Times-Roman\"\npdf.text \"Hello, #{@name}.\",\n  :font_size =&gt; 72, :justification =&gt; :center\n<\/pre>\n<p><a href=\"http:\/\/www.artima.com\/rubycs\/articles\/pdf_writer.html\">Artima<\/a> has a great article that covers in great detail the PDF::Writer library.  With PDF::Writer you can create PDF documents with embedded images, business charts, tables, etc.  With this plugin you can create PDF reports and documents from rails applications.  You can create a PDF document for all of your blog posts.<\/p>\n<p>Technorati Tags: <a href=\"http:\/\/technorati.com\/tag\/ruby\" rel=\"tag\">ruby<\/a>, <a href=\"http:\/\/technorati.com\/tag\/rails\" rel=\"tag\">  rails<\/a>, <a href=\"http:\/\/technorati.com\/tag\/ruby+on+rails\" rel=\"tag\">  ruby on rails<\/a>, <a href=\"http:\/\/technorati.com\/tag\/plugin\" rel=\"tag\">  plugin<\/a>, <a href=\"http:\/\/technorati.com\/tag\/rails+plugin\" rel=\"tag\">  rails plugin<\/a>, <a href=\"http:\/\/technorati.com\/tag\/activeview\" rel=\"tag\"> activeview<\/a>, <a href=\"http:\/\/technorati.com\/tag\/pdf\" rel=\"tag\"> pdf<\/a>, <a href=\"http:\/\/technorati.com\/tag\/rails+pdf\" rel=\"tag\"> rails pdf<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is one the the most simple and useful plugins you can use. To get started you will need to install the PDF::Writer gem. gem install pdf-writer Install the Rails PDF Plugin. script\/plugin install svn:\/\/rubyforge.org\/\/var\/svn\/railspdfplugin\/railspdf To create a PDF document for an action, you need to change the action&#8217;s view extension from rhtml to rpdf. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[22,3],"tags":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p902K-27","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/131"}],"collection":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/comments?post=131"}],"version-history":[{"count":0,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/131\/revisions"}],"wp:attachment":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/media?parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/categories?post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/tags?post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}