<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Robert Dempsey - Latest Comments in Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://adsblog.disqus.com/</link><description></description><atom:link href="https://adsblog.disqus.com/easy_pdf_generation_with_ruby_rails_and_htmldoc/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 19 Nov 2010 05:41:17 -0000</lastBuildDate><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-99393162</link><description>&lt;p&gt;Hello! I'am using HTMLDoc to generate some pdf out of data in a DB. I am using Rails 2.3.5 and HTMLDoc 1.8.27. In my rails configuration file I have required htmldoc and htmldoc-rails.&lt;/p&gt;&lt;p&gt;It is working fine in my sandbox (except that I have to uncomment require htmldoc-rails to migrate DB), but when I deploy it at my Apache server (Ubuntu 10.04) using capistrano and passenger, the server only displays a passenger faultpage. It displays my application if I uncomment "require htmldoc-rails", but then it will not create pdf's.&lt;/p&gt;&lt;p&gt;Have someone experienced the same problems?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anders</dc:creator><pubDate>Fri, 19 Nov 2010 05:41:17 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-58056419</link><description>&lt;p&gt;Just what I was looking for. Works like a charm!!! thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gary</dc:creator><pubDate>Tue, 22 Jun 2010 11:48:39 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-48791394</link><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I'm having difficulty installing htmldoc-1.9.x-r1629 on ubuntu 9.10&lt;/p&gt;&lt;p&gt;when I write "make" I get the following:&lt;/p&gt;&lt;p&gt;Making all in htmldoc...&lt;br&gt;Compiling htmldoc.cxx...&lt;br&gt;htmldoc.cxx: In function ‘void parse_options(const char*, int (**)(hdTree*, hdTree*, hdTree*))’:&lt;br&gt;htmldoc.cxx:2201: warning: ‘font_family’ may be used uninitialized in this function&lt;br&gt;htmldoc.cxx:2202: warning: ‘font_style’ may be used uninitialized in this function&lt;br&gt;htmldoc.cxx:2203: warning: ‘font_weight’ may be used uninitialized in this function&lt;br&gt;htmldoc.cxx: In function ‘int main(int, char**)’:&lt;br&gt;htmldoc.cxx:522: warning: ‘font_family’ may be used uninitialized in this function&lt;br&gt;htmldoc.cxx:523: warning: ‘font_style’ may be used uninitialized in this function&lt;br&gt;htmldoc.cxx:524: warning: ‘font_weight’ may be used uninitialized in this function&lt;br&gt;Compiling array.cxx...&lt;br&gt;Compiling entity.cxx...&lt;br&gt;Compiling file.cxx...&lt;br&gt;file.cxx: In static member function ‘static char* hdFile::basename(const char*, char*, size_t)’:&lt;br&gt;file.cxx:111: error: invalid conversion from ‘const char*’ to ‘char*’&lt;br&gt;file.cxx: In static member function ‘static char* hdFile::localize(char*, size_t, const char*)’:&lt;br&gt;file.cxx:585: warning: deprecated conversion from string constant to ‘char*’&lt;br&gt;file.cxx:587: warning: ignoring return value of ‘char* getcwd(char*, size_t)’, declared with attribute warn_unused_result&lt;br&gt;make[1]: *** [file.o] Error 1&lt;/p&gt;&lt;p&gt;and when I write "make" I get the following:&lt;/p&gt;&lt;p&gt;Making all in htmldoc...&lt;br&gt;Compiling file.cxx...&lt;br&gt;file.cxx: In static member function ‘static char* hdFile::basename(const char*, char*, size_t)’:&lt;br&gt;file.cxx:111: error: invalid conversion from ‘const char*’ to ‘char*’&lt;br&gt;file.cxx: In static member function ‘static char* hdFile::localize(char*, size_t, const char*)’:&lt;br&gt;file.cxx:585: warning: deprecated conversion from string constant to ‘char*’&lt;br&gt;file.cxx:587: warning: ignoring return value of ‘char* getcwd(char*, size_t)’, declared with attribute warn_unused_result&lt;br&gt;make[2]: *** [file.o] Error 1&lt;br&gt;Installing in fonts...&lt;br&gt;Installing font files in /usr/local/share/htmldoc/fonts...&lt;br&gt;Installing in data...&lt;br&gt;Installing in doc...&lt;br&gt;Rebuilding documentation...&lt;br&gt;Formatting htmldoc.html...&lt;br&gt;/bin/sh: ../htmldoc/htmldoc: not found&lt;br&gt;make[1]: *** [htmldoc.html] Error 127&lt;/p&gt;&lt;p&gt;Is there any plans to fix it???&lt;/p&gt;&lt;p&gt;Thank you.&lt;br&gt;Tico Mauriño&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ticomaurio</dc:creator><pubDate>Thu, 06 May 2010 21:21:32 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-45777958</link><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I'm having difficulty installing htmldoc as instructed in the article on linux.&lt;/p&gt;&lt;p&gt;First I had to change this line 'curl -O &lt;a href="http://ftp.easysw.com/pub/htmldoc/snapshots/htmldoc-1.9.x-r1521.tar.gz'" rel="nofollow noopener" target="_blank" title="http://ftp.easysw.com/pub/htmldoc/snapshots/htmldoc-1.9.x-r1521.tar.gz'"&gt;http://ftp.easysw.com/pub/h...&lt;/a&gt;&lt;br&gt;to the latest version which I believe was r1629.&lt;/p&gt;&lt;p&gt;The rest of the steps went smoothly except when I try to install with 'sudo make install' I get the following:&lt;/p&gt;&lt;p&gt;aking all in htmldoc...&lt;br&gt;Making all in doc...&lt;br&gt;Formatting htmldoc.html...&lt;br&gt;INFO: Reading intro.html...&lt;br&gt;INFO: Reading 1-install.html...&lt;br&gt;INFO: Reading 2-starting.html...&lt;br&gt;INFO: Reading 3-books.html...&lt;br&gt;INFO: Reading 4-cmdline.html...&lt;br&gt;INFO: Reading 5-cgi.html...&lt;br&gt;INFO: Reading 6-htmlref.html...&lt;br&gt;INFO: Reading 7-guiref.html...&lt;br&gt;INFO: Reading 8-cmdref.html...&lt;br&gt;INFO: Reading a-license.html...&lt;br&gt;INFO: Reading b-book.html...&lt;br&gt;INFO: Reading c-relnotes.html...&lt;br&gt;INFO: Reading d-compile.html...&lt;br&gt;make[2]: *** [htmldoc.html] Segmentation fault&lt;br&gt;make[2]: *** Deleting file `htmldoc.html'&lt;br&gt;Installing in fonts...&lt;br&gt;Installing font files in /usr/local/share/htmldoc/fonts...&lt;br&gt;Installing in data...&lt;br&gt;Installing in doc...&lt;br&gt;Formatting htmldoc.html...&lt;br&gt;INFO: Reading intro.html...&lt;br&gt;INFO: Reading 1-install.html...&lt;br&gt;INFO: Reading 2-starting.html...&lt;br&gt;INFO: Reading 3-books.html...&lt;br&gt;INFO: Reading 4-cmdline.html...&lt;br&gt;INFO: Reading 5-cgi.html...&lt;br&gt;INFO: Reading 6-htmlref.html...&lt;br&gt;INFO: Reading 7-guiref.html...&lt;br&gt;INFO: Reading 8-cmdref.html...&lt;br&gt;INFO: Reading a-license.html...&lt;br&gt;INFO: Reading b-book.html...&lt;br&gt;INFO: Reading c-relnotes.html...&lt;br&gt;INFO: Reading d-compile.html...&lt;br&gt;make[1]: *** [htmldoc.html] Segmentation fault&lt;br&gt;make[1]: *** Deleting file `htmldoc.html'&lt;/p&gt;&lt;p&gt;Do these segmentation faults mean it has failed?  When I do a search for htmldoc on the file system it doesn't appear in the /usr/local/share directory.&lt;/p&gt;&lt;p&gt;Any help would be greatly appreciated.  Thanks in advance!&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chris</dc:creator><pubDate>Wed, 21 Apr 2010 01:24:54 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-42551902</link><description>&lt;p&gt;Hi Robert,&lt;/p&gt;&lt;p&gt;I had this problem as well and it was because my environment.rb did not have the correct lines in it....&lt;/p&gt;&lt;p&gt;"I placed Mime::Type.register 'application/pdf', :pdf at the end of my environment.rb file, as in outside of the "Rails::&lt;a href="http://Initializer.run" rel="nofollow noopener" target="_blank" title="Initializer.run"&gt;Initializer.run&lt;/a&gt; do |config|" block&lt;/p&gt;&lt;p&gt;I placed require 'htmldoc' at the beginning of the environment.rb file, also outside of the "Rails::&lt;a href="http://Initializer.run" rel="nofollow noopener" target="_blank" title="Initializer.run"&gt;Initializer.run&lt;/a&gt; do |config|" block&lt;br&gt;"&lt;/p&gt;&lt;p&gt;Hope that helps.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Gauthier</dc:creator><pubDate>Wed, 31 Mar 2010 20:02:46 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-42551663</link><description>&lt;p&gt;Does anyone know where to find additional documentation for the htmldoc ruby gem.  I have found this site &lt;a href="http://htmldoc.rubyforge.org/" rel="nofollow noopener" target="_blank" title="http://htmldoc.rubyforge.org/"&gt;http://htmldoc.rubyforge.org/&lt;/a&gt;, but I am looking for somewhere that will list all of the options.  For example I used pdf.set_option :title, false but I just guessed that that was the correct option to remove the title page.  Is there a good site that lists all of them?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Gauthier</dc:creator><pubDate>Wed, 31 Mar 2010 20:00:58 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-42551360</link><description>&lt;p&gt;I placed  Mime::Type.register 'application/pdf', :pdf  at the end of my environment.rb file, as in outside of the "Rails::&lt;a href="http://Initializer.run" rel="nofollow noopener" target="_blank" title="Initializer.run"&gt;Initializer.run&lt;/a&gt; do |config|"  block&lt;/p&gt;&lt;p&gt;I placed require 'htmldoc' at the beginning of the environment.rb file, also outside of the "Rails::&lt;a href="http://Initializer.run" rel="nofollow noopener" target="_blank" title="Initializer.run"&gt;Initializer.run&lt;/a&gt; do |config|"  block&lt;/p&gt;&lt;p&gt;Hope that helps...&lt;/p&gt;&lt;p&gt;mg&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Gauthier</dc:creator><pubDate>Wed, 31 Mar 2010 19:59:07 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-32439382</link><description>&lt;p&gt;got the soltn for this , am facing the same.. can anyone help ?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">font</dc:creator><pubDate>Tue, 02 Feb 2010 20:56:05 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-24707222</link><description>&lt;p&gt;&lt;br&gt;I've got some code using PDF::Writer, and managing the templates is a pain. If I could design the templates using normal HTML views, and then render them as PDF with some reasonable control over the style, I'd be a happy man.&lt;br&gt;&lt;a href="http://www.staffingpower.com" rel="nofollow noopener" target="_blank" title="www.staffingpower.com"&gt;www.staffingpower.com&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">itjobs1</dc:creator><pubDate>Thu, 03 Dec 2009 14:11:49 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755879</link><description>&lt;p&gt;Sorry this one got messed up. So, the special comments are &amp;gt; !-- NEW_PAGE-- &amp;lt;, &amp;gt; !-- FOOTER LEFT "foo" -- &amp;lt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wolfram</dc:creator><pubDate>Sat, 19 Sep 2009 23:56:37 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755878</link><description>&lt;p&gt;Nice article, thanks a lot!&lt;br&gt;I'm trying to include special htmldoc comments, such as ,  and so on, but failed so far. Does anyone have a hint?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wolfram</dc:creator><pubDate>Sat, 19 Sep 2009 23:54:00 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755877</link><description>&lt;p&gt;Thank You!!!&lt;/p&gt;&lt;p&gt;&lt;a href="http://torpedogratis.inf.br" rel="nofollow noopener" target="_blank" title="http://torpedogratis.inf.br"&gt;Torpedo Gratis&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Torpedo</dc:creator><pubDate>Tue, 08 Sep 2009 20:28:36 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755876</link><description>&lt;p&gt;A suggestion: if you are dealing with an UTF-encoded website, you should replace the line:&lt;br&gt;data = render_to_string(options)&lt;br&gt;with the following line:&lt;br&gt;data = Iconv.conv('ISO-8859-15//IGNORE//TRANSLIT', 'utf-8', render_to_string(options))&lt;br&gt;This is needed because htmldoc (at least v1.8) doesn't support UTF&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">sildur</dc:creator><pubDate>Mon, 07 Sep 2009 21:16:52 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755875</link><description>&lt;p&gt;Hello m8. In first place thank you for the great gem/plugin.&lt;/p&gt;&lt;p&gt;I'm currently having a problem. I'm trying to apply a body image to my pdf's using the method:&lt;br&gt;pdf.set_option :bodyimage, "report_bg.jpg"&lt;/p&gt;&lt;p&gt;It's not that the image doesn't display right, it just doesn't display at all...&lt;/p&gt;&lt;p&gt;Any ideas? Tks in advance&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nuno Prata</dc:creator><pubDate>Wed, 26 Aug 2009 06:56:06 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755874</link><description>&lt;p&gt;Hi Robert. We haven't tried HTML doc with passenger. We have successfully used &lt;a href="http://prawn.majesticseacreature.com/" rel="nofollow noopener" target="_blank" title="http://prawn.majesticseacreature.com/"&gt;Prawn&lt;/a&gt; with that setup though. I'd give that a try.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Robert Dempsey</dc:creator><pubDate>Thu, 28 May 2009 07:33:30 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755873</link><description>&lt;p&gt;Having some issues with HTMLDoc, Rails 2.2.2 and Phusion Passenger  - Apache. With the GEM installed, passenger refuses to start up with an "Unknown error" and doesn't log anything so debugging is tough. Have you had any successful implementations on Rails 2.2.2 with Passenger? Suggestions on how to proceed?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Robert Hall</dc:creator><pubDate>Wed, 27 May 2009 15:32:57 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755872</link><description>&lt;p&gt;Nice article, I had things up and running in a few minutes...&lt;/p&gt;&lt;p&gt;But show stopper for me: HTMLDOC does not support CJK (Chinese, Japanese, Korean) languages.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Yves-Eric</dc:creator><pubDate>Tue, 31 Mar 2009 02:08:37 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755871</link><description>&lt;p&gt;Hi, I want to know how can I set the page as landscape.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Fernando</dc:creator><pubDate>Fri, 27 Mar 2009 17:09:12 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755870</link><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;getting error as for rails application.&lt;br&gt;"'htmldoc' is not recognized as an internal or external command,\noperable program or batch file.\n"&lt;/p&gt;&lt;p&gt;Thank you&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kams</dc:creator><pubDate>Fri, 20 Feb 2009 08:53:02 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755869</link><description>&lt;p&gt;getting file does not begin with '%pdf-'  error..  Can anyone help me..&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">bharati</dc:creator><pubDate>Mon, 01 Dec 2008 02:29:12 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755868</link><description>&lt;p&gt;saving for later&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Robert</dc:creator><pubDate>Fri, 28 Nov 2008 14:09:56 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755867</link><description>&lt;p&gt;def self.generate_pdf(url, links=false)&lt;br&gt;        doc = &lt;a href="http://Document.new" rel="nofollow noopener" target="_blank" title="Document.new"&gt;Document.new&lt;/a&gt;&lt;br&gt;        doc.mime = 'application/pdf'&lt;br&gt;        pdf = PDF::&lt;a href="http://HTMLDoc.new" rel="nofollow noopener" target="_blank" title="HTMLDoc.new"&gt;HTMLDoc.new&lt;/a&gt;&lt;br&gt;        pdf.set_option :bodycolor, :white&lt;br&gt;        pdf.set_option :links, links&lt;br&gt;        pdf.set_option :webpage, true&lt;br&gt;        pdf.set_option :path, "#{RAILS_ROOT}/public/"&lt;br&gt;        pdf &amp;lt;&amp;lt; url&lt;br&gt;        pdf.footer ".1."&lt;br&gt;        if pdf.generate&lt;br&gt;            puts "Successfully generated a PDF file"&lt;br&gt;            doc.body = pdf.generate&lt;br&gt;        else&lt;br&gt;            puts "ERROR!--------------------------------------------"&lt;br&gt;            for error in pdf.errors&lt;br&gt;                puts error&lt;br&gt;            end&lt;br&gt;        end&lt;br&gt;        doc&lt;br&gt;    end&lt;/p&gt;&lt;p&gt;The important line is the pdf.set_option :path,  #{RAILS_ROOT}/public/"&lt;/p&gt;&lt;p&gt;It tells htmldoc to look in your public folder for images.&lt;/p&gt;&lt;p&gt;If you manually create the img tag this will work and the images will be the same on the web as in the pdf. Using image_tag however will not work, because rails adds on the uid to each image.&lt;/p&gt;&lt;p&gt;If you were adventurous, you could parse out the uid from the tags with gsub. Now if I could just figure out how to keep the errors without having to generate twice.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Robert</dc:creator><pubDate>Fri, 28 Nov 2008 14:09:41 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755866</link><description>&lt;p&gt;Just a note for Ubuntu users: HTMLDOC must be installed by hand (configure, make, make install as stated here by author): if you install it with apt-get then HTMLDOC is not working in rails :)&lt;br&gt;With Debian is fine to install htmldoc with apt-get install.&lt;/p&gt;&lt;p&gt;The patch for images is necessary in both Debian and Ubuntu.&lt;/p&gt;&lt;p&gt;Thank you *very much* to all the people who shared their knowledge here :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Francesco</dc:creator><pubDate>Sun, 14 Sep 2008 07:50:46 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755864</link><description>&lt;p&gt;dafinn:&lt;/p&gt;&lt;p&gt;I've got an app that does the same. I wrote a very simple helper that expands the image paths.&lt;/p&gt;&lt;p&gt;  def write_full_image_path(text)&lt;br&gt;    newtext = text.gsub('img src="', 'img src="' + File.expand_path(RAILS_ROOT) + '/public/')&lt;br&gt;    newtext&lt;br&gt;  end&lt;/p&gt;&lt;p&gt;Then, in my .rpdf files, I call for write_full_image_path(model.formatted_text)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric Wagoner</dc:creator><pubDate>Fri, 22 Aug 2008 15:31:24 -0000</pubDate></item><item><title>Re: Easy PDF Generation with Ruby, Rails, and HTMLDOC</title><link>http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/#comment-20755863</link><description>&lt;p&gt;First of all, Great work! Due to the Patch of Christoph printing Images with a complete path is working now!&lt;br&gt;BUT... I am storing Articles in my Database. I use FCKEditor for the User-interface - the text is stored HTML formatted and the path for Images is stored in the HTML Code in form of "/public/uploads/Images" and so on. I have explored that HTMLDOC needs the full path(as some People above). For Example http://0.0.0.0:3000/public/uploads/Images ... &lt;br&gt;Has anyone an idea  how to fix this? I have seen the pdf_image_tag but i am not sure how it works...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dafinn</dc:creator><pubDate>Fri, 15 Aug 2008 04:38:19 -0000</pubDate></item></channel></rss>