2 Replies Latest reply on Feb 7, 2008 10:31 AM by Mikee

    <cfdocumentitem type="footer"  > ignores CSS

    Mikee
      Looks like the <cfdocumentitem type="footer" > tag which is part of <cfdocument> ignores all attempts to style it with CSS.

      I can't change the font family, or color.

      Any ideas.

      I might have to completely re-engineer my product because this tag is so buggy
        • 1. Re: <cfdocumentitem type="footer"  > ignores CSS
          matstone98
          Is your stylesheet/css file contained within the CFDOCUMENT tag?

          I've had similar problems when using this tag, can you provide an example of your code and I'll take a look?
          • 2. Re: <cfdocumentitem type="footer"  > ignores CSS
            Mikee Level 1
            I've pasted the page that creates the PDF.
            This is just a demo page that duplicates the problem. I stripped out all the code and content to keep this simple.

            The style sheet is included in the cfdoc tag.
            Style sheet works for the main content but not the footer which is being forced to a timesnewromanPSMT font which i do not want.


            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns=" http://www.w3.org/1999/xhtml">

            <cfdocument name="yoda" filename="MyPDF.PDF" format="PDF" pagetype="letter" margintop=".6" marginbottom="1" marginright=".5" marginleft=".5" orientation="portrait" unit="in" encryption="none" backgroundvisible="no" overwrite="yes" fontembed="no" >

            <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <title>PDF Creator</title>

            <style type="text/css">

            body {
            background: white;
            font-family: Arial, Helvetica, sans-serif;
            margin: 0px 0px 0px 8px;
            text-align: center;
            margin-left: 10px;
            font-size: 12px;
            }

            .FirstPageTitles {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 36px;
            }
            .Foot {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 10px;
            color: Fuchsia;
            }
            </style>

            </head>
            <body>
            <br /><br />
            <p>
            This page should be a PDF with correct fonts</p>
            <p>Fonts should show up as Arial font</p><br /><br />

            <p align="center" class="FirstPageTitles">Career Test Report-(36pt Arial) </p>
            <p align="center" class="FirstPageTitles">PDF Demo</p>
            <h4 align="center" >Prepared For</h4>
            <p align="center" >My Best Customer (12 pt Arial) </p>
            <p align="center" ><br />
            <br />
            <br />
            <br />
            <br />
            </p>
            <p align="center" >footer should be Arial 10 pt </p>
            <p align="center" >scroll down to see footer </p>

            <cfdocumentitem type="footer" >
            <div class = "Foot" align="right" ><cfoutput>
            #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#</cfoutput> </div>

            <div class = "Foot" align="center" >Copyright 1998-2008 CareerPlanner.com Inc. All Rights Reserved.</div>
            </cfdocumentitem>

            </body>
            </html>
            </cfdocument>


            <cflocation url="Start-Demo.cfm" >