This is pretty old but it might be helpful.

http://www.coldfusionmuse.com/index.cfm/2006/2/16/cfdocument.performance


The main thing to realize is that converting HTML to PDF is really a trick -
going from a fluid medium to a very staticky and specific medium. Unless
your HTML is already pretty lean and minimal you may need a different layout
wrapper.

Also check to see if your CSS is even making it into cfdocument. Remember
that if you use something like:

<link rel="stylesheet" type="text/css" href="/css/mystylesheet.css"
media="screen" /> 

In your cfdocument, CF has to retrieve that resource to "include" it into
the doc. Under the hood it makes a cfhttp call right? The server has to
resolve the domain into the proper IP etc. So a lot of things might have to
go right for that to work. 

-Mark

Mark A. Kruger, CFG, MCSE
(402) 408-3733 ext 105
www.cfwebtools.com
www.coldfusionmuse.com
www.necfug.com

-----Original Message-----
From: Judah McAuley [mailto:ju...@wiredotter.com] 
Sent: Thursday, June 18, 2009 1:17 PM
To: cf-talk
Subject: css and cfdocument...grrr


Ok, I know cfdocument is finicky about the html it tries to render into a
pdf. I have a template I'm putting together and it validates xhtml
transitional, it uses both @import and link to include the stylesheet (just
in case), I use a standard Yahoo supplied reset css file and the resulting
html renders identically in Firefox, IE 7 and Chrome.

So, several things don't actually render correctly at all in the resulting
pdf. Things like background colors bleeding over into other elements,
background colors not showing up at all on a div whose only content are
other divs, etc.

Where are the best places to look for tips on making it behave? And are
there good troubleshooting guides for things to pay attention to/avoid? I'm
ok with a little black magic but this is getting irritating as there is no
obvious place to correct these problems.

Thanks,
Judah



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323654
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to