<?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: CFDocument and CSS Hell</title>
	<atom:link href="http://thecrumb.com/2007/08/16/cfdocument-and-css-hell/feed/" rel="self" type="application/rss+xml" />
	<link>http://thecrumb.com/2007/08/16/cfdocument-and-css-hell/</link>
	<description>developer &#124; thinker &#124; tinkerer</description>
	<lastBuildDate>Mon, 06 Feb 2012 15:30:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: David Levin</title>
		<link>http://thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-2078</link>
		<dc:creator>David Levin</dc:creator>
		<pubDate>Tue, 10 May 2011 22:20:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-2078</guid>
		<description>Thanks for the info on this. I&#039;m working on creating a PDF for a client and it&#039;s been a real bear trying to get those styles working right.  It also looks like there&#039;s a specific list of accepted style params that PDFs can understand.  I found that list here: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_d-e_05.html (look under &quot;supported CSS styles&quot;).</description>
		<content:encoded><![CDATA[<p>Thanks for the info on this. I&#8217;m working on creating a PDF for a client and it&#8217;s been a real bear trying to get those styles working right.  It also looks like there&#8217;s a specific list of accepted style params that PDFs can understand.  I found that list here: <a href="http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_d-e_05.html" rel="nofollow">http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_d-e_05.html</a> (look under &#8220;supported CSS styles&#8221;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-302</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Mon, 21 Sep 2009 18:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-302</guid>
		<description>Your post helped me figure out a similar problem that I was having. I realize that this post is over 2 years old, but maybe my reply will help somebody ;)

My solution ended up being that I include a single style sheet to use with the PDF layout within the  tag, but I constructed a valid HTML document inside this tag and used a  inside the  of this page to bring in my css.

In this case, it doesn&#039;t matter that you are including seperate pieces of content from different places, because you are feeding the cfdocument tag a valid document.

Here is the code I&#039;m referring to (I&#039;m using coldbox, so ignore Event or view related lines):







CFDocument Page




	&lt;!--- Content Here! --&gt;</description>
		<content:encoded><![CDATA[<p>Your post helped me figure out a similar problem that I was having. I realize that this post is over 2 years old, but maybe my reply will help somebody ;)</p>
<p>My solution ended up being that I include a single style sheet to use with the PDF layout within the  tag, but I constructed a valid HTML document inside this tag and used a  inside the  of this page to bring in my css.</p>
<p>In this case, it doesn&#8217;t matter that you are including seperate pieces of content from different places, because you are feeding the cfdocument tag a valid document.</p>
<p>Here is the code I&#8217;m referring to (I&#8217;m using coldbox, so ignore Event or view related lines):</p>
<p>CFDocument Page</p>
<p>	<!--- Content Here! --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian Halliwell</title>
		<link>http://thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-301</link>
		<dc:creator>Julian Halliwell</dc:creator>
		<pubDate>Mon, 20 Aug 2007 07:52:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-301</guid>
		<description>Jim, try using the file protocol with a file system path to the stylesheet:

[link rel=â€stylesheetâ€ type=â€text/cssâ€ href=â€file:///#expandPath(myCssDirectory)#docstyles.cssâ€]

Note the 3 slashes, not 2. This is vital.

Also, my understanding is that only html 4.0 is supported in cfdocument (ie not xhtml).</description>
		<content:encoded><![CDATA[<p>Jim, try using the file protocol with a file system path to the stylesheet:</p>
<p>[link rel=â€stylesheetâ€ type=â€text/cssâ€ href=â€file:///#expandPath(myCssDirectory)#docstyles.cssâ€]</p>
<p>Note the 3 slashes, not 2. This is vital.</p>
<p>Also, my understanding is that only html 4.0 is supported in cfdocument (ie not xhtml).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-300</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Fri, 17 Aug 2007 14:01:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-300</guid>
		<description>OK - FWIW - I get the same behavior with @import.  I still have to include it within each cfdocumentitem, etc  - no different than using link...</description>
		<content:encoded><![CDATA[<p>OK &#8211; FWIW &#8211; I get the same behavior with @import.  I still have to include it within each cfdocumentitem, etc  &#8211; no different than using link&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-299</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Fri, 17 Aug 2007 12:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-299</guid>
		<description>Not running CF8 (yet)...  Tony - I&#039;ll try using an import vs. a link to call my CSS.   I&#039;ve updated the post above with my final solution - and it seems to work OK.  And FWIW - none of my cfincluded documents include any doctype, head/body, etc...</description>
		<content:encoded><![CDATA[<p>Not running CF8 (yet)&#8230;  Tony &#8211; I&#8217;ll try using an import vs. a link to call my CSS.   I&#8217;ve updated the post above with my final solution &#8211; and it seems to work OK.  And FWIW &#8211; none of my cfincluded documents include any doctype, head/body, etc&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Petruzzi</title>
		<link>http://thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-298</link>
		<dc:creator>Tony Petruzzi</dc:creator>
		<pubDate>Fri, 17 Aug 2007 03:10:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-298</guid>
		<description>First off Jim is correct, you need to have a fully valid HTML page in order to get cfdocument to even remotely render correctly.

I would recommend (and what I personally do) is create your page statically first with some dummy data and then validate it against the w3c validator. Make sure your using XHTML 1.0 Transitional, that seems it to work best.

The final step is DO NOT use link on inline styles within your cfdocument, you MUST use import to load your css. This was mentioned to me a long time ago and I&#039;ve always remembered it. It&#039;s saved me a bunch of time and frustration.</description>
		<content:encoded><![CDATA[<p>First off Jim is correct, you need to have a fully valid HTML page in order to get cfdocument to even remotely render correctly.</p>
<p>I would recommend (and what I personally do) is create your page statically first with some dummy data and then validate it against the w3c validator. Make sure your using XHTML 1.0 Transitional, that seems it to work best.</p>
<p>The final step is DO NOT use link on inline styles within your cfdocument, you MUST use import to load your css. This was mentioned to me a long time ago and I&#8217;ve always remembered it. It&#8217;s saved me a bunch of time and frustration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TJ Downes</title>
		<link>http://thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-297</link>
		<dc:creator>TJ Downes</dc:creator>
		<pubDate>Fri, 17 Aug 2007 02:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-297</guid>
		<description>agreed. Are you perchance running CF8? I found cfdocument far better with CF8 than 7, even with existing apps.</description>
		<content:encoded><![CDATA[<p>agreed. Are you perchance running CF8? I found cfdocument far better with CF8 than 7, even with existing apps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-296</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Thu, 16 Aug 2007 17:27:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-296</guid>
		<description>The problem is these pages are just content - there is no HTML header/footer, etc.  I could maybe generate a printer friendly index.cfm and call that with CFDcoument - but that seems like extra work I shouldn&#039;t have to do.</description>
		<content:encoded><![CDATA[<p>The problem is these pages are just content &#8211; there is no HTML header/footer, etc.  I could maybe generate a printer friendly index.cfm and call that with CFDcoument &#8211; but that seems like extra work I shouldn&#8217;t have to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TJ Downes</title>
		<link>http://thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-295</link>
		<dc:creator>TJ Downes</dc:creator>
		<pubDate>Thu, 16 Aug 2007 17:21:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-295</guid>
		<description>You&#039;re not doing anything wrong there. What you&#039;re doing is exactly what you should be :)

An alternative is to have a generated HTML page and then use cfhttp to get that page and then use it to create the cfdocument. You might find this produces more reliable results and allows you to use a stylesheet</description>
		<content:encoded><![CDATA[<p>You&#8217;re not doing anything wrong there. What you&#8217;re doing is exactly what you should be :)</p>
<p>An alternative is to have a generated HTML page and then use cfhttp to get that page and then use it to create the cfdocument. You might find this produces more reliable results and allows you to use a stylesheet</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-294</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Thu, 16 Aug 2007 16:37:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecrumb.com/2007/08/16/cfdocument-and-css-hell/#comment-294</guid>
		<description>What would be nice is if I could do:

cfdocument stylesheet = &quot;print.css&quot;</description>
		<content:encoded><![CDATA[<p>What would be nice is if I could do:</p>
<p>cfdocument stylesheet = &#8220;print.css&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

