• Home
  • About George
  • Contact Me
Blue Orange Green Pink Purple

CFDocument Style Fixes

Posted in ColdFusion. on Wednesday, April 1st, 2009 by George Tags: ColdFusion, CSS
Apr 01

Okay – so I had spent a good bit of time working on a few pages that I rendered as both HTML and PDF and they worked like champs, made it through one round with the client even.  Came back the next season – this week – to prep them for the next go round, add the changed fields, clean up some other code, and wouldn’t you know it but the HTML rendered fine and the PDFs didn’t.  This threw me for a total loop.  I wasn’t sure what had happened.  I found this post – cfdocument post by rip – and thought that may be the solution, but it wasn’t working either.  I got the pages to be XHTML strict even!

Then a co-worker suggested we just copy all the CSS into the pages.  Wouldn’t you know it but putting the CSS in a style tag on the page itself rendered the items as they should be.  So to preserve reusability I snapped them inbetween the style tags with a cfinclude.  That’s my suggestion for anyone else having trouble with this kind of thing. And make sure you have the media type with print in there too for your style declaration!

Leave a Reply

Web Development By George

  • About
    About me. Edit this in the options panel.
  • Photo Stream
  • Categories
    • ColdFusion
    • coldspring
    • Databases
    • Design
    • Flash
    • Flex
    • Internet
    • JavaScript
    • jQuery
    • Model-Glue
    • Personal
    • Subversion
    • Uncategorized
    • YUI
  • Recent Articles
    • Radios and JQuery and IE8
    • Coldfusion, Flex, and SSL
    • Leaving it to the Experts
    • CFAjaxProxy Problems or RTFM
    • I love the Internet
    • Interesting ColdFusion Survey
  • Archives
    • November 2011
    • May 2011
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • November 2009
    • October 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
  • Search




Add to Technorati Favorites

  • Home
  • About George
  • Contact Me

© Copyright Web Development By George. All rights reserved.
Designed by FTL Wordpress Themes brought to you by Smashing Magazine

Back to Top