<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PDF::Writer and Ruby on Rails 2.2.2</title>
	<atom:link href="http://info.michael-simons.eu/2008/11/24/pdfwriter-and-ruby-on-rails-222/feed/" rel="self" type="application/rss+xml" />
	<link>http://info.michael-simons.eu/2008/11/24/pdfwriter-and-ruby-on-rails-222/</link>
	<description>Just another nerd blog</description>
	<lastBuildDate>Tue, 07 Feb 2012 06:40:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Michael</title>
		<link>http://info.michael-simons.eu/2008/11/24/pdfwriter-and-ruby-on-rails-222/#comment-6805</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 19 Jul 2011 07:21:31 +0000</pubDate>
		<guid isPermaLink="false">http://info.michael-simons.eu/?p=234#comment-6805</guid>
		<description>Hi Jonathan,

the short answer is now, sorry.

The longer version:
i&#039;ve stopped using Rails with version 2.3.5. Rack and Rails have severe bugs that didn&#039;t get fixed and with 3.x i wdidnould have to rewrite at last halve of my application. Pdf-Writer was one of the things that didn&#039;t work anymore.</description>
		<content:encoded><![CDATA[<p>Hi Jonathan,</p>
<p>the short answer is now, sorry.</p>
<p>The longer version:<br />
i&#8217;ve stopped using Rails with version 2.3.5. Rack and Rails have severe bugs that didn&#8217;t get fixed and with 3.x i wdidnould have to rewrite at last halve of my application. Pdf-Writer was one of the things that didn&#8217;t work anymore.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://info.michael-simons.eu/2008/11/24/pdfwriter-and-ruby-on-rails-222/#comment-6804</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Tue, 19 Jul 2011 07:00:20 +0000</pubDate>
		<guid isPermaLink="false">http://info.michael-simons.eu/?p=234#comment-6804</guid>
		<description>I don&#039;t suppose you have some insight on how to get pdf-writer templates working on rails 3.1? I was getting the errors to change but not able to actually get PDFs to render.

Thanks,
-Jonathan</description>
		<content:encoded><![CDATA[<p>I don&#8217;t suppose you have some insight on how to get pdf-writer templates working on rails 3.1? I was getting the errors to change but not able to actually get PDFs to render.</p>
<p>Thanks,<br />
-Jonathan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://info.michael-simons.eu/2008/11/24/pdfwriter-and-ruby-on-rails-222/#comment-6555</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 04 Dec 2008 16:22:47 +0000</pubDate>
		<guid isPermaLink="false">http://info.michael-simons.eu/?p=234#comment-6555</guid>
		<description>Weird, as said in the following post...

Never got rmagick to work with native windows so i use cygwin. 

Windows dev: pdf-writer 1.1.7

OS X dev + Debian prod: pdf-writer 1.1.8</description>
		<content:encoded><![CDATA[<p>Weird, as said in the following post&#8230;</p>
<p>Never got rmagick to work with native windows so i use cygwin. </p>
<p>Windows dev: pdf-writer 1.1.7</p>
<p>OS X dev + Debian prod: pdf-writer 1.1.8</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Kellermann</title>
		<link>http://info.michael-simons.eu/2008/11/24/pdfwriter-and-ruby-on-rails-222/#comment-6554</link>
		<dc:creator>John Kellermann</dc:creator>
		<pubDate>Thu, 04 Dec 2008 16:19:48 +0000</pubDate>
		<guid isPermaLink="false">http://info.michael-simons.eu/?p=234#comment-6554</guid>
		<description>I&#039;m using pdf-writer 1.1.8.

My pdf might have displayed inline if I had the Adobe Reader browser plugin installed, but I didn&#039;t want to require that of my users.

Must be some subtle problem with the new Rails on native Windows OS. I&#039;m not using Cygwin. 

Downgrading Rails on my workstation to 2.1.2 works (with the patch for Rails 2.1). That also fixed the problem I was having with writing to Postgresql tables.</description>
		<content:encoded><![CDATA[<p>I&#8217;m using pdf-writer 1.1.8.</p>
<p>My pdf might have displayed inline if I had the Adobe Reader browser plugin installed, but I didn&#8217;t want to require that of my users.</p>
<p>Must be some subtle problem with the new Rails on native Windows OS. I&#8217;m not using Cygwin. </p>
<p>Downgrading Rails on my workstation to 2.1.2 works (with the patch for Rails 2.1). That also fixed the problem I was having with writing to Postgresql tables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://info.michael-simons.eu/2008/11/24/pdfwriter-and-ruby-on-rails-222/#comment-6549</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 04 Dec 2008 15:11:35 +0000</pubDate>
		<guid isPermaLink="false">http://info.michael-simons.eu/?p=234#comment-6549</guid>
		<description>Hey John,
you&#039;re welcome.

Is it the same plugin you&#039;re using?

For me its working with cygwin/win32 (using mongrel) and mac os x (mongrel as well).

Also, works in FF and IE, PDF is displayed inline, not as dl.

Cheers,
Michael.</description>
		<content:encoded><![CDATA[<p>Hey John,<br />
you&#8217;re welcome.</p>
<p>Is it the same plugin you&#8217;re using?</p>
<p>For me its working with cygwin/win32 (using mongrel) and mac os x (mongrel as well).</p>
<p>Also, works in FF and IE, PDF is displayed inline, not as dl.</p>
<p>Cheers,<br />
Michael.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Kellermann</title>
		<link>http://info.michael-simons.eu/2008/11/24/pdfwriter-and-ruby-on-rails-222/#comment-6538</link>
		<dc:creator>John Kellermann</dc:creator>
		<pubDate>Wed, 03 Dec 2008 22:04:55 +0000</pubDate>
		<guid isPermaLink="false">http://info.michael-simons.eu/?p=234#comment-6538</guid>
		<description>Thanks for the patch.

I got it to work, mostly, but I had to modify it.

I replaced your render method with the original one from railspdf.rb, keeping the next-to-last line (eval template...) from your version of the method.

#     eval template, nil, &quot;#{@action_view.base_path}/#{@action_view.first_render}.#{@action_view.pick_template_extension(@action_view.first_render)}&quot; 
#2.1  eval template.source, nil, &quot;#{@action_view.base_path}/#{@action_view.first_render}.#{@action_view.pick_template_extension(@action_view.first_render)}&quot; 
       eval template.source, nil, &#039;&#039;
 
This allowed me to use @rails_pdf_name and &quot;keep ie happy&quot;.

Before I added that code, Firefox displayed the PDF as text in the browser. IE wouldn&#039;t allow it to be viewed, and opened a download dialog with a warning:

&quot;The file you are downloading cannot be opened by the default program. It is either corrupted or it has an incorrect file type. As a security precaution it is recommended that you cancel the download...&quot;

When I saved the downloaded file, I could open it normally with Acrobat Reader.

After I restored most of the render method, IE worked normally, but Firefox did not recognize it as a PDF. I had to select Acrobat Reader manually to open the file, and when I did I saw that it had appended &quot;.htm&quot; to the file name.

This was in my development environment, with Rails 2.2.2 under Windows XP, using the WEBrick server. It&#039;s working fine (with the 2.1 patch) deployed on a Linux box running Mongrel and Rails 2.1.2. I&#039;m going to try downgrading to 2.1.2 Rails on my workstation. I&#039;m having a problem writing to Postgresql tables too.</description>
		<content:encoded><![CDATA[<p>Thanks for the patch.</p>
<p>I got it to work, mostly, but I had to modify it.</p>
<p>I replaced your render method with the original one from railspdf.rb, keeping the next-to-last line (eval template&#8230;) from your version of the method.</p>
<p>#     eval template, nil, &#8220;#{@action_view.base_path}/#{@action_view.first_render}.#{@action_view.pick_template_extension(@action_view.first_render)}&#8221;<br />
#2.1  eval template.source, nil, &#8220;#{@action_view.base_path}/#{@action_view.first_render}.#{@action_view.pick_template_extension(@action_view.first_render)}&#8221;<br />
       eval template.source, nil, &#8221;</p>
<p>This allowed me to use @rails_pdf_name and &#8220;keep ie happy&#8221;.</p>
<p>Before I added that code, Firefox displayed the PDF as text in the browser. IE wouldn&#8217;t allow it to be viewed, and opened a download dialog with a warning:</p>
<p>&#8220;The file you are downloading cannot be opened by the default program. It is either corrupted or it has an incorrect file type. As a security precaution it is recommended that you cancel the download&#8230;&#8221;</p>
<p>When I saved the downloaded file, I could open it normally with Acrobat Reader.</p>
<p>After I restored most of the render method, IE worked normally, but Firefox did not recognize it as a PDF. I had to select Acrobat Reader manually to open the file, and when I did I saw that it had appended &#8220;.htm&#8221; to the file name.</p>
<p>This was in my development environment, with Rails 2.2.2 under Windows XP, using the WEBrick server. It&#8217;s working fine (with the 2.1 patch) deployed on a Linux box running Mongrel and Rails 2.1.2. I&#8217;m going to try downgrading to 2.1.2 Rails on my workstation. I&#8217;m having a problem writing to Postgresql tables too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://info.michael-simons.eu/2008/11/24/pdfwriter-and-ruby-on-rails-222/#comment-6537</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 02 Dec 2008 14:17:12 +0000</pubDate>
		<guid isPermaLink="false">http://info.michael-simons.eu/?p=234#comment-6537</guid>
		<description>You&#039;re welcome.

Strange, i&#039;m using it in production and just double checked if cache_classes is turned on.

It&#039;s in a file config/initializers/PDFRender.rb

Hm...

Cheers,
Michael.</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome.</p>
<p>Strange, i&#8217;m using it in production and just double checked if cache_classes is turned on.</p>
<p>It&#8217;s in a file config/initializers/PDFRender.rb</p>
<p>Hm&#8230;</p>
<p>Cheers,<br />
Michael.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Wahler</title>
		<link>http://info.michael-simons.eu/2008/11/24/pdfwriter-and-ruby-on-rails-222/#comment-6536</link>
		<dc:creator>Robert Wahler</dc:creator>
		<pubDate>Tue, 02 Dec 2008 14:10:51 +0000</pubDate>
		<guid isPermaLink="false">http://info.michael-simons.eu/?p=234#comment-6536</guid>
		<description>Thanks for posting this, it helped me update to 2.2.2.  I could only get this to work in development however.   If config.cache_classes is true as in production and test, the handler is never registered.  I fixed this by moving your code to a plugin and out of lib and environment.rb.

-robert</description>
		<content:encoded><![CDATA[<p>Thanks for posting this, it helped me update to 2.2.2.  I could only get this to work in development however.   If config.cache_classes is true as in production and test, the handler is never registered.  I fixed this by moving your code to a plugin and out of lib and environment.rb.</p>
<p>-robert</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.384 seconds -->

