Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 444
  • Last Modified:

CFDOCUMENT and CSS

I've been playing around with cfdocument and it's driving me absolutely nuts!  I have a simple page that looks something like this

<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>

<cfinclude teamplate="title.cfm">

Tjos os a test


</body>
</html>

When i wrap  a cfdocument around this, it creates the PDF just fine, however the problem I'm having is that the included template does not pickup my stiles.   I don't know what to do to get this fixed.  I want Aial.  Any thoughts.  Thanks in advance
0
trifecta2k
Asked:
trifecta2k
  • 4
  • 3
2 Solutions
 
SidFishesCommented:
You can't use  link to the style sheet. You need to use @import

It's also picky about doctype

more here http://rip747.wordpress.com/2007/09/10/cfdocument-it-works-if-you-know-how/
0
 
trifecta2kAuthor Commented:
I will try that and let you know. Probably won't be able to get to it until Monday.
0
 
trifecta2kAuthor Commented:
I did everything and it works for the most part.  I still have one weird issue.  In my PDF I use <cfimage>.  This block isn't hit all the time because some reports have a chart and some don't.  When it hits the <cfimage> tag the font size seems to resize.  Any ideas?  These reports need to look uniform and right now they change size when I add an image.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
SidFishesCommented:
not specifically but there are a couple of things to try

1) make sure you are fully patched. There have been many, many cfdocument issues fixed since the tag was introduced.
2) unless there's a compelling reason, don't use cfimage within the tag. Do whatever image manipulation you need to, write it to disk and then load with a simple <img> tag.
0
 
trifecta2kAuthor Commented:
I am fully patched.  I tried just using a regular img and my pdf still looks like it's scaling down.
0
 
SidFishesCommented:
From what I've seen images with resolution higher than 96 dpi may cuase this scaling issue - you could see if making sure that is the case helps.

you also may want to try forcing the page size of cfdocument by adding the pagetype="letter" attribute (I'd try this one first if you haven't already)
0
 
trifecta2kAuthor Commented:
That was it!  Between the pagetype and the css doc I got it to work.  Thanks!
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now